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
37738e1a
Unverified
Commit
37738e1a
authored
May 04, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs for root target definitions being abstract by default
parent
910ad461
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
9 deletions
+20
-9
spec_helper.rb
spec/spec_helper.rb
+5
-1
module_map_spec.rb
spec/unit/generator/module_map_spec.rb
+1
-2
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+2
-2
post_install_hooks_context_spec.rb
spec/unit/installer/post_install_hooks_context_spec.rb
+1
-1
xcconfig_integrator_spec.rb
..._integrator/target_integrator/xcconfig_integrator_spec.rb
+1
-0
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+1
-0
installer_spec.rb
spec/unit/installer_spec.rb
+3
-1
library_spec.rb
spec/unit/library_spec.rb
+2
-2
aggregate_target_spec.rb
spec/unit/target/aggregate_target_spec.rb
+3
-0
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+1
-0
No files found.
spec/spec_helper.rb
View file @
37738e1a
...
...
@@ -117,7 +117,11 @@ end
def
fixture_target_definition
(
name
=
'Pods'
,
platform
=
Pod
::
Platform
.
ios
)
platform_hash
=
{
platform
.
symbolic_name
=>
platform
.
deployment_target
}
Pod
::
Podfile
::
TargetDefinition
.
new
(
name
,
Pod
::
Podfile
.
new
,
'name'
=>
name
,
'platform'
=>
platform_hash
)
parent
=
Pod
::
Podfile
.
new
Pod
::
Podfile
::
TargetDefinition
.
new
(
name
,
parent
,
'abstract'
=>
false
,
'name'
=>
name
,
'platform'
=>
platform_hash
)
end
def
fixture_pod_target
(
spec_or_name
,
target_definitions
=
[])
...
...
spec/unit/generator/module_map_spec.rb
View file @
37738e1a
...
...
@@ -4,8 +4,7 @@ module Pod
describe
Generator
::
ModuleMap
do
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
@pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
spec
],
[
fixture_target_definition
],
config
.
sandbox
)
@gen
=
Generator
::
ModuleMap
.
new
(
@pod_target
)
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
37738e1a
...
...
@@ -182,8 +182,8 @@ module Pod
result
=
@analyzer
.
analyze
sample_project_target
,
test_runner_target
=
result
.
targets
.
sort_by
(
&
:name
)
sample_project_target
.
pod_targets
.
map
(
&
:name
).
should
==
%w(libextobjc)
test_runner_target
.
pod_targets
.
map
(
&
:name
).
should
.
be
.
empty
sample_project_target
.
pod_targets
.
map
(
&
:name
).
should
==
%w(libextobjc
-iOS5.0
)
test_runner_target
.
pod_targets
.
map
(
&
:name
).
should
==
%w(libextobjc-iOS5.1)
sample_project_target
.
user_targets
.
map
(
&
:name
).
should
==
%w(SampleProject)
test_runner_target
.
user_targets
.
map
(
&
:name
).
should
==
%w(TestRunner)
...
...
spec/unit/installer/post_install_hooks_context_spec.rb
View file @
37738e1a
...
...
@@ -9,7 +9,7 @@ module Pod
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
user_project
=
Xcodeproj
::
Project
.
open
(
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
))
user_target
=
user_project
.
native_targets
.
find
{
|
np
|
np
.
name
==
'SampleProject'
}
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
target_definition
=
fixture_target_definition
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
umbrella
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
umbrella
.
user_project
=
user_project
...
...
spec/unit/installer/user_project_integrator/target_integrator/xcconfig_integrator_spec.rb
View file @
37738e1a
...
...
@@ -8,6 +8,7 @@ module Pod
Project
.
new
(
config
.
sandbox
.
project_path
).
save
@target
=
@project
.
targets
.
first
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
target_definition
.
abstract
=
false
@pod_bundle
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
@pod_bundle
.
user_project
=
@project
@pod_bundle
.
client_root
=
project_path
.
dirname
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
37738e1a
...
...
@@ -13,6 +13,7 @@ module Pod
Project
.
new
(
config
.
sandbox
.
project_path
).
save
@target
=
@project
.
targets
.
first
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
target_definition
.
abstract
=
false
@pod_bundle
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
@pod_bundle
.
user_project
=
@project
@pod_bundle
.
client_root
=
project_path
.
dirname
...
...
spec/unit/installer_spec.rb
View file @
37738e1a
...
...
@@ -615,6 +615,7 @@ module Pod
it
'install the targets of the Pod project'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
abstract
=
false
target_definition
.
store_pod
(
'BananaLib'
)
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
...
...
@@ -626,6 +627,7 @@ module Pod
it
'does not skip empty pod targets'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
abstract
=
false
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
@installer
.
stubs
(
:aggregate_targets
).
returns
([])
@installer
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
...
...
@@ -660,7 +662,7 @@ module Pod
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
.
root_target_definitions
.
first
)
@pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
@target
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
...
...
spec/unit/library_spec.rb
View file @
37738e1a
...
...
@@ -4,7 +4,7 @@ module Pod
describe
Pod
::
AggregateTarget
do
describe
'In general'
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
=
fixture_target_definition
@lib
=
AggregateTarget
.
new
(
@target_definition
,
config
.
sandbox
)
end
...
...
@@ -27,7 +27,7 @@ module Pod
describe
'Support files'
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
=
fixture_target_definition
@lib
=
AggregateTarget
.
new
(
@target_definition
,
config
.
sandbox
)
@lib
.
client_root
=
config
.
sandbox
.
root
.
dirname
end
...
...
spec/unit/target/aggregate_target_spec.rb
View file @
37738e1a
...
...
@@ -5,6 +5,7 @@ module Pod
describe
'In general'
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
.
abstract
=
false
@target
=
AggregateTarget
.
new
(
@target_definition
,
config
.
sandbox
)
end
...
...
@@ -41,6 +42,7 @@ module Pod
describe
'Support files'
do
before
do
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
.
abstract
=
false
@target
=
AggregateTarget
.
new
(
@target_definition
,
config
.
sandbox
)
@target
.
client_root
=
config
.
sandbox
.
root
.
dirname
end
...
...
@@ -86,6 +88,7 @@ module Pod
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
.
abstract
=
false
@pod_target
=
PodTarget
.
new
([
@spec
],
[
@target_definition
],
config
.
sandbox
)
@target
=
AggregateTarget
.
new
(
@target_definition
,
config
.
sandbox
)
@target
.
stubs
(
:platform
).
returns
(
:ios
)
...
...
spec/unit/target/pod_target_spec.rb
View file @
37738e1a
...
...
@@ -5,6 +5,7 @@ module Pod
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@target_definition
.
abstract
=
false
@pod_target
=
PodTarget
.
new
([
spec
],
[
@target_definition
],
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
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