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
71126280
Commit
71126280
authored
Dec 23, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Test Validator#podfile_from_spec
parent
e4d56d54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
validator_spec.rb
spec/unit/validator_spec.rb
+25
-6
No files found.
spec/unit/validator_spec.rb
View file @
71126280
...
@@ -301,12 +301,31 @@ module Pod
...
@@ -301,12 +301,31 @@ module Pod
podfile
=
validator
.
send
(
:perform_extensive_analysis
,
validator
.
spec
)
podfile
=
validator
.
send
(
:perform_extensive_analysis
,
validator
.
spec
)
end
end
it
'respects the local option'
do
describe
'#podfile_from_spec'
do
sut
=
Validator
.
new
(
podspec_path
,
SourcesManager
.
master
.
map
(
&
:url
))
before
do
sut
.
stubs
(
:validate_url
)
@sut
=
Validator
.
new
(
podspec_path
,
SourcesManager
.
master
.
map
(
&
:url
))
podfile
=
sut
.
send
(
:podfile_from_spec
,
:ios
,
'5.0'
)
@sut
.
stubs
(
:validate_url
)
deployment_target
=
podfile
.
target_definitions
[
'Pods'
].
platform
.
deployment_target
end
deployment_target
.
to_s
.
should
==
'5.0'
it
'configures the deployment target'
do
podfile
=
@sut
.
send
(
:podfile_from_spec
,
:ios
,
'5.0'
)
target_definition
=
podfile
.
target_definitions
[
'Pods'
]
platform
=
target_definition
.
platform
platform
.
symbolic_name
.
should
==
:ios
platform
.
deployment_target
.
to_s
.
should
==
'5.0'
end
it
'includes the use_frameworks! directive'
do
podfile
=
@sut
.
send
(
:podfile_from_spec
,
:ios
,
'5.0'
,
true
)
target_definition
=
podfile
.
target_definitions
[
'Pods'
]
target_definition
.
uses_frameworks?
.
should
==
true
end
it
'includes the use_frameworks!(false) directive'
do
podfile
=
@sut
.
send
(
:podfile_from_spec
,
:ios
,
'5.0'
,
false
)
target_definition
=
podfile
.
target_definitions
[
'Pods'
]
(
!!
target_definition
.
uses_frameworks?
).
should
==
false
end
end
end
it
'repects the source_urls parameter'
do
it
'repects the source_urls parameter'
do
...
...
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