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
e6390d93
Commit
e6390d93
authored
Feb 04, 2016
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Test PodVariantSet with true Specification
Instead of a stub
parent
b8f32ec3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
pod_variant_set_spec.rb
spec/unit/installer/analyzer/pod_variant_set_spec.rb
+14
-12
No files found.
spec/unit/installer/analyzer/pod_variant_set_spec.rb
View file @
e6390d93
...
...
@@ -4,7 +4,10 @@ module Pod
describe
PodVariantSet
=
Installer
::
Analyzer
::
PodVariantSet
do
describe
'#scope_suffixes'
do
before
do
@root_spec
=
stub
(
:name
=>
'Spec'
,
:root?
=>
true
)
@root_spec
=
fixture_spec
(
'matryoshka/matryoshka.podspec'
)
@default_subspec
=
@root_spec
.
subspec_by_name
(
'matryoshka/Outer'
)
@foo_subspec
=
@root_spec
.
subspec_by_name
(
'matryoshka/Foo'
)
@bar_subspec
=
@root_spec
.
subspec_by_name
(
'matryoshka/Bar'
)
end
PodVariant
=
Pod
::
Installer
::
Analyzer
::
PodVariant
.
freeze
...
...
@@ -39,19 +42,18 @@ module Pod
end
it
'returns scopes by subspec names if they qualify'
do
shared_subspec
=
stub
(
:name
=>
'Spec/Shared'
,
:root?
=>
false
)
variants
=
PodVariantSet
.
new
([
PodVariant
.
new
([
@root_spec
,
shared
_subspec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
shared_subspec
,
stub
(
:name
=>
'Spec/Foo'
,
:root?
=>
false
)
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
shared_subspec
,
stub
(
:name
=>
'Spec/Bar'
,
:root?
=>
false
)
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
@default
_subspec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
@default_subspec
,
@foo_subspec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
@default_subspec
,
@bar_subspec
],
Platform
.
ios
),
])
variants
.
scope_suffixes
.
values
.
should
==
[
nil
,
'Foo'
,
'Bar'
]
end
it
'returns scopes by subspec names if they qualify and handle partial root spec presence well'
do
variants
=
PodVariantSet
.
new
([
PodVariant
.
new
([
stub
(
:name
=>
'Spec/Foo'
,
:root?
=>
false
)
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
stub
(
:name
=>
'Spec/Bar'
,
:root?
=>
false
)
],
Platform
.
ios
),
PodVariant
.
new
([
@foo_subspec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
@bar_subspec
],
Platform
.
ios
),
])
variants
.
scope_suffixes
.
values
.
should
==
[
'Foo'
,
'Bar-root'
]
end
...
...
@@ -59,9 +61,9 @@ module Pod
it
'returns scopes by platform names and subspec names if they qualify'
do
variants
=
PodVariantSet
.
new
([
PodVariant
.
new
([
@root_spec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
stub
(
:name
=>
'Spec/Foo'
,
:root?
=>
false
)
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
@foo_subspec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
],
Platform
.
osx
),
PodVariant
.
new
([
@root_spec
,
stub
(
:name
=>
'Spec/Bar'
,
:root?
=>
false
)
],
Platform
.
osx
),
PodVariant
.
new
([
@root_spec
,
@bar_subspec
],
Platform
.
osx
),
])
variants
.
scope_suffixes
.
values
.
should
==
[
'iOS'
,
...
...
@@ -74,9 +76,9 @@ module Pod
it
'returns scopes by versioned platform names and subspec names if they qualify'
do
variants
=
PodVariantSet
.
new
([
PodVariant
.
new
([
@root_spec
],
Platform
.
new
(
:ios
,
'7.0'
)),
PodVariant
.
new
([
@root_spec
,
stub
(
:name
=>
'Spec/Foo'
,
:root?
=>
false
)
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
,
@foo_subspec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
],
Platform
.
osx
),
PodVariant
.
new
([
@root_spec
,
stub
(
:name
=>
'Spec/Bar'
,
:root?
=>
false
)
],
Platform
.
osx
),
PodVariant
.
new
([
@root_spec
,
@bar_subspec
],
Platform
.
osx
),
])
variants
.
scope_suffixes
.
values
.
should
==
[
'iOS7.0'
,
...
...
@@ -91,7 +93,7 @@ module Pod
PodVariant
.
new
([
@root_spec
],
Platform
.
new
(
:ios
,
'7.0'
)),
PodVariant
.
new
([
@root_spec
],
Platform
.
ios
),
PodVariant
.
new
([
@root_spec
],
Platform
.
osx
,
true
),
PodVariant
.
new
([
@root_spec
,
stub
(
:name
=>
'Spec/Foo'
,
:root?
=>
false
)
],
Platform
.
osx
,
true
),
PodVariant
.
new
([
@root_spec
,
@foo_subspec
],
Platform
.
osx
,
true
),
])
variants
.
scope_suffixes
.
values
.
should
==
[
'library-iOS7.0'
,
...
...
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