Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
6b29904c
Commit
6b29904c
authored
Feb 04, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specs] Minor changes.
parent
3c3c0e00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
plist_spec.rb
spec/unit/generator/acknowledgements/plist_spec.rb
+12
-12
No files found.
spec/unit/generator/acknowledgements/plist_spec.rb
View file @
6b29904c
...
...
@@ -4,21 +4,21 @@ describe Pod::Generator::Plist do
before
do
@file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
@spec
=
@file_accessor
.
spec
@
plist
=
Pod
::
Generator
::
Plist
.
new
([
@file_accessor
])
@
generator
=
Pod
::
Generator
::
Plist
.
new
([
@file_accessor
])
@spec
.
stubs
(
:name
).
returns
(
"POD_NAME"
)
@
plist
.
stubs
(
:license_text
).
returns
(
"LICENSE_TEXT"
)
@
generator
.
stubs
(
:license_text
).
returns
(
"LICENSE_TEXT"
)
end
it
"returns the correct number of licenses (including header and footnote)"
do
@
plist
.
licenses
.
count
.
should
==
3
@
generator
.
licenses
.
count
.
should
==
3
end
it
"returns a string for the plist title"
do
@
plist
.
plist_title
.
should
.
be
.
kind_of
(
String
)
@
generator
.
plist_title
.
should
.
be
.
kind_of
(
String
)
end
it
"returns a correctly formed license hash for each pod"
do
@
plist
.
hash_for_spec
(
@spec
).
should
==
{
@
generator
.
hash_for_spec
(
@spec
).
should
==
{
:Type
=>
"PSGroupSpecifier"
,
:Title
=>
"POD_NAME"
,
:FooterText
=>
"LICENSE_TEXT"
...
...
@@ -26,23 +26,23 @@ describe Pod::Generator::Plist do
end
it
"returns nil for a pod with no license text"
do
@
plist
.
expects
(
:license_text
).
returns
(
nil
)
@
plist
.
hash_for_spec
(
@spec
).
should
.
be
.
nil
@
generator
.
expects
(
:license_text
).
returns
(
nil
)
@
generator
.
hash_for_spec
(
@spec
).
should
.
be
.
nil
end
it
"returns a plist containg the licenses"
do
@
plist
.
plist
.
should
==
{
@
generator
.
plist
.
should
==
{
:Title
=>
"Acknowledgements"
,
:StringsTable
=>
"Acknowledgements"
,
:PreferenceSpecifiers
=>
@
plist
.
licenses
:PreferenceSpecifiers
=>
@
generator
.
licenses
}
end
it
"writes a plist to disk at the given path"
do
basepath
=
config
.
sandbox
.
root
+
"Pods-acknowledgements"
given_path
=
@
plist
.
class
.
path_from_basepath
(
basepath
)
given_path
=
@
generator
.
class
.
path_from_basepath
(
basepath
)
expected_path
=
config
.
sandbox
.
root
+
"Pods-acknowledgements.plist"
Xcodeproj
.
expects
(
:write_plist
).
with
(
equals
(
@
plist
.
plist
),
equals
(
expected_path
))
@
plist
.
save_as
(
given_path
)
Xcodeproj
.
expects
(
:write_plist
).
with
(
equals
(
@
generator
.
plist
),
equals
(
expected_path
))
@
generator
.
save_as
(
given_path
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment