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
d2306d6c
Commit
d2306d6c
authored
Jan 25, 2016
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Adopt changed pod target scoping name scheme
parent
0911c67e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+7
-7
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+13
-13
No files found.
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
d2306d6c
...
@@ -141,22 +141,22 @@ module Pod
...
@@ -141,22 +141,22 @@ module Pod
@installer
.
install!
@installer
.
install!
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
'
Pods-BananaLib
-dummy.m'
,
'
BananaLib-Pods
-dummy.m'
,
'
Pods-BananaLib
-prefix.pch'
,
'
BananaLib-Pods
-prefix.pch'
,
'
Pods-BananaLib
.xcconfig'
,
'
BananaLib-Pods
.xcconfig'
,
]
]
end
end
it
'adds the target for the static library to the project'
do
it
'adds the target for the static library to the project'
do
@installer
.
install!
@installer
.
install!
@project
.
targets
.
count
.
should
==
1
@project
.
targets
.
count
.
should
==
1
@project
.
targets
.
first
.
name
.
should
==
'
Pods-BananaLib
'
@project
.
targets
.
first
.
name
.
should
==
'
BananaLib-Pods
'
end
end
it
'adds the resource bundle targets'
do
it
'adds the resource bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@installer
.
install!
@installer
.
install!
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'
Pods-BananaLib
-banana_bundle'
}
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'
BananaLib-Pods
-banana_bundle'
}
bundle_target
.
should
.
be
.
an
.
instance_of
Xcodeproj
::
Project
::
Object
::
PBXNativeTarget
bundle_target
.
should
.
be
.
an
.
instance_of
Xcodeproj
::
Project
::
Object
::
PBXNativeTarget
bundle_target
.
product_reference
.
name
.
should
==
'banana_bundle.bundle'
bundle_target
.
product_reference
.
name
.
should
==
'banana_bundle.bundle'
bundle_target
.
product_reference
.
path
.
should
==
'banana_bundle.bundle'
bundle_target
.
product_reference
.
path
.
should
==
'banana_bundle.bundle'
...
@@ -167,7 +167,7 @@ module Pod
...
@@ -167,7 +167,7 @@ module Pod
it
'adds the build configurations to the resources bundle targets'
do
it
'adds the build configurations to the resources bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@installer
.
install!
@installer
.
install!
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'
Pods-BananaLib
-banana_bundle'
}
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'
BananaLib-Pods
-banana_bundle'
}
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
bundle_target
.
build_configurations
.
each
do
|
bc
|
bundle_target
.
build_configurations
.
each
do
|
bc
|
...
@@ -178,7 +178,7 @@ module Pod
...
@@ -178,7 +178,7 @@ module Pod
it
'sets the correct targeted device family for the resource bundle targets'
do
it
'sets the correct targeted device family for the resource bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@installer
.
install!
@installer
.
install!
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'
Pods-BananaLib
-banana_bundle'
}
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'
BananaLib-Pods
-banana_bundle'
}
bundle_target
.
build_configurations
.
each
do
|
bc
|
bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'TARGETED_DEVICE_FAMILY'
].
should
==
'1,2'
bc
.
build_settings
[
'TARGETED_DEVICE_FAMILY'
].
should
==
'1,2'
...
...
spec/unit/target/pod_target_spec.rb
View file @
d2306d6c
...
@@ -30,17 +30,17 @@ module Pod
...
@@ -30,17 +30,17 @@ module Pod
it
'returns its name'
do
it
'returns its name'
do
@pod_target
.
name
.
should
==
'BananaLib'
@pod_target
.
name
.
should
==
'BananaLib'
@pod_target
.
scoped
.
first
.
name
.
should
==
'
Pods-BananaLib
'
@pod_target
.
scoped
.
first
.
name
.
should
==
'
BananaLib-Pods
'
end
end
it
'returns its label'
do
it
'returns its label'
do
@pod_target
.
label
.
should
==
'BananaLib'
@pod_target
.
label
.
should
==
'BananaLib'
@pod_target
.
scoped
.
first
.
label
.
should
==
'
Pods-BananaLib
'
@pod_target
.
scoped
.
first
.
label
.
should
==
'
BananaLib-Pods
'
end
end
it
'returns the name of its product'
do
it
'returns the name of its product'
do
@pod_target
.
product_name
.
should
==
'libBananaLib.a'
@pod_target
.
product_name
.
should
==
'libBananaLib.a'
@pod_target
.
scoped
.
first
.
product_name
.
should
==
'lib
Pods-BananaLib
.a'
@pod_target
.
scoped
.
first
.
product_name
.
should
==
'lib
BananaLib-Pods
.a'
end
end
it
'returns the spec consumers for the pod targets'
do
it
'returns the spec consumers for the pod targets'
do
...
@@ -57,7 +57,7 @@ module Pod
...
@@ -57,7 +57,7 @@ module Pod
it
'returns the name of the resources bundle target'
do
it
'returns the name of the resources bundle target'
do
@pod_target
.
resources_bundle_target_label
(
'Fruits'
).
should
==
'BananaLib-Fruits'
@pod_target
.
resources_bundle_target_label
(
'Fruits'
).
should
==
'BananaLib-Fruits'
@pod_target
.
scoped
.
first
.
resources_bundle_target_label
(
'Fruits'
).
should
==
'
Pods-BananaLib
-Fruits'
@pod_target
.
scoped
.
first
.
resources_bundle_target_label
(
'Fruits'
).
should
==
'
BananaLib-Pods
-Fruits'
end
end
it
'returns the name of the Pods on which this target depends'
do
it
'returns the name of the Pods on which this target depends'
do
...
@@ -109,7 +109,7 @@ module Pod
...
@@ -109,7 +109,7 @@ module Pod
'Pods/Target Support Files/BananaLib/BananaLib.release.xcconfig'
,
'Pods/Target Support Files/BananaLib/BananaLib.release.xcconfig'
,
)
)
@pod_target
.
scoped
.
first
.
xcconfig_path
(
'Release'
).
to_s
.
should
.
include?
(
@pod_target
.
scoped
.
first
.
xcconfig_path
(
'Release'
).
to_s
.
should
.
include?
(
'Pods/Target Support Files/
Pods-BananaLib/Pods-BananaLib
.release.xcconfig'
,
'Pods/Target Support Files/
BananaLib-Pods/BananaLib-Pods
.release.xcconfig'
,
)
)
end
end
...
@@ -118,7 +118,7 @@ module Pod
...
@@ -118,7 +118,7 @@ module Pod
'Pods/Target Support Files/BananaLib/BananaLib.release-1.xcconfig'
,
'Pods/Target Support Files/BananaLib/BananaLib.release-1.xcconfig'
,
)
)
@pod_target
.
scoped
.
first
.
xcconfig_path
(
"Release
#{
File
::
SEPARATOR
}
1"
).
to_s
.
should
.
include?
(
@pod_target
.
scoped
.
first
.
xcconfig_path
(
"Release
#{
File
::
SEPARATOR
}
1"
).
to_s
.
should
.
include?
(
'Pods/Target Support Files/
Pods-BananaLib/Pods-BananaLib
.release-1.xcconfig'
,
'Pods/Target Support Files/
BananaLib-Pods/BananaLib-Pods
.release-1.xcconfig'
,
)
)
end
end
...
@@ -127,7 +127,7 @@ module Pod
...
@@ -127,7 +127,7 @@ module Pod
'Pods/Target Support Files/BananaLib/BananaLib-prefix.pch'
,
'Pods/Target Support Files/BananaLib/BananaLib-prefix.pch'
,
)
)
@pod_target
.
scoped
.
first
.
prefix_header_path
.
to_s
.
should
.
include?
(
@pod_target
.
scoped
.
first
.
prefix_header_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/
Pods-BananaLib/Pods-BananaLib
-prefix.pch'
,
'Pods/Target Support Files/
BananaLib-Pods/BananaLib-Pods
-prefix.pch'
,
)
)
end
end
...
@@ -142,7 +142,7 @@ module Pod
...
@@ -142,7 +142,7 @@ module Pod
'Pods/Target Support Files/BananaLib/Info.plist'
,
'Pods/Target Support Files/BananaLib/Info.plist'
,
)
)
@pod_target
.
scoped
.
first
.
info_plist_path
.
to_s
.
should
.
include?
(
@pod_target
.
scoped
.
first
.
info_plist_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/
Pods-BananaLib
/Info.plist'
,
'Pods/Target Support Files/
BananaLib-Pods
/Info.plist'
,
)
)
end
end
...
@@ -151,7 +151,7 @@ module Pod
...
@@ -151,7 +151,7 @@ module Pod
'Pods/Target Support Files/BananaLib/BananaLib-dummy.m'
,
'Pods/Target Support Files/BananaLib/BananaLib-dummy.m'
,
)
)
@pod_target
.
scoped
.
first
.
dummy_source_path
.
to_s
.
should
.
include?
(
@pod_target
.
scoped
.
first
.
dummy_source_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/
Pods-BananaLib/Pods-BananaLib
-dummy.m'
,
'Pods/Target Support Files/
BananaLib-Pods/BananaLib-Pods
-dummy.m'
,
)
)
end
end
...
@@ -192,7 +192,7 @@ module Pod
...
@@ -192,7 +192,7 @@ module Pod
it
'returns the library name'
do
it
'returns the library name'
do
@pod_target
.
static_library_name
.
should
==
'libBananaLib.a'
@pod_target
.
static_library_name
.
should
==
'libBananaLib.a'
@pod_target
.
scoped
.
first
.
static_library_name
.
should
==
'lib
Pods-BananaLib
.a'
@pod_target
.
scoped
.
first
.
static_library_name
.
should
==
'lib
BananaLib-Pods
.a'
end
end
it
'returns :framework as product type'
do
it
'returns :framework as product type'
do
...
@@ -207,7 +207,7 @@ module Pod
...
@@ -207,7 +207,7 @@ module Pod
describe
'Host does not requires frameworks'
do
describe
'Host does not requires frameworks'
do
it
'returns the product name'
do
it
'returns the product name'
do
@pod_target
.
product_name
.
should
==
'libBananaLib.a'
@pod_target
.
product_name
.
should
==
'libBananaLib.a'
@pod_target
.
scoped
.
first
.
product_name
.
should
==
'lib
Pods-BananaLib
.a'
@pod_target
.
scoped
.
first
.
product_name
.
should
==
'lib
BananaLib-Pods
.a'
end
end
it
'returns the framework name'
do
it
'returns the framework name'
do
...
@@ -216,7 +216,7 @@ module Pod
...
@@ -216,7 +216,7 @@ module Pod
it
'returns the library name'
do
it
'returns the library name'
do
@pod_target
.
static_library_name
.
should
==
'libBananaLib.a'
@pod_target
.
static_library_name
.
should
==
'libBananaLib.a'
@pod_target
.
scoped
.
first
.
static_library_name
.
should
==
'lib
Pods-BananaLib
.a'
@pod_target
.
scoped
.
first
.
static_library_name
.
should
==
'lib
BananaLib-Pods
.a'
end
end
it
'returns :static_library as product type'
do
it
'returns :static_library as product type'
do
...
@@ -253,7 +253,7 @@ module Pod
...
@@ -253,7 +253,7 @@ module Pod
it
'returns the library name'
do
it
'returns the library name'
do
@pod_target
.
static_library_name
.
should
==
'libOrangeFramework.a'
@pod_target
.
static_library_name
.
should
==
'libOrangeFramework.a'
@pod_target
.
scoped
.
first
.
static_library_name
.
should
==
'lib
Pods-OrangeFramework
.a'
@pod_target
.
scoped
.
first
.
static_library_name
.
should
==
'lib
OrangeFramework-Pods
.a'
end
end
it
'returns :framework as product type'
do
it
'returns :framework as product type'
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