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
62c30fd7
Commit
62c30fd7
authored
Feb 05, 2016
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec PodTargetInstaller] Combine resource bundle target specs
parent
e6390d93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
40 deletions
+38
-40
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+38
-40
No files found.
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
62c30fd7
...
@@ -154,35 +154,32 @@ module Pod
...
@@ -154,35 +154,32 @@ module Pod
@project
.
targets
.
first
.
name
.
should
==
'BananaLib-Pods-SampleProject'
@project
.
targets
.
first
.
name
.
should
==
'BananaLib-Pods-SampleProject'
end
end
it
'adds the resource bundle targets'
do
describe
'resource bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
before
do
@installer
.
install!
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-Pods-SampleProject-banana_bundle'
}
@installer
.
install!
bundle_target
.
should
.
be
.
an
.
instance_of
Xcodeproj
::
Project
::
Object
::
PBXNativeTarget
@bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-Pods-SampleProject-banana_bundle'
}
bundle_target
.
product_reference
.
name
.
should
==
'banana_bundle.bundle'
end
bundle_target
.
product_reference
.
path
.
should
==
'banana_bundle.bundle'
bundle_target
.
platform_name
.
should
==
:ios
bundle_target
.
deployment_target
.
should
==
'4.3'
end
it
'adds the build configurations to the resources bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@installer
.
install!
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-Pods-SampleProject-banana_bundle'
}
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
it
'adds the resource bundle targets'
do
bundle_target
.
build_configurations
.
each
do
|
bc
|
@bundle_target
.
should
.
be
.
an
.
instance_of
Xcodeproj
::
Project
::
Object
::
PBXNativeTarget
bc
.
base_configuration_reference
.
real_path
.
should
==
file
@bundle_target
.
product_reference
.
name
.
should
==
'banana_bundle.bundle'
@bundle_target
.
product_reference
.
path
.
should
==
'banana_bundle.bundle'
@bundle_target
.
platform_name
.
should
==
:ios
@bundle_target
.
deployment_target
.
should
==
'4.3'
end
end
end
it
'sets the correct targeted device family for the resource 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'
=>
[])
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
@installer
.
install!
@bundle_target
.
build_configurations
.
each
do
|
bc
|
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-Pods-SampleProject-banana_bundle'
}
bc
.
base_configuration_reference
.
real_path
.
should
==
file
end
end
bundle_target
.
build_configurations
.
each
do
|
bc
|
it
'sets the correct targeted device family for the resource bundle targets'
do
bc
.
build_settings
[
'TARGETED_DEVICE_FAMILY'
].
should
==
'1,2'
@bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'TARGETED_DEVICE_FAMILY'
].
should
==
'1,2'
end
end
end
end
end
end
end
...
@@ -207,23 +204,24 @@ module Pod
...
@@ -207,23 +204,24 @@ module Pod
@project
.
targets
.
first
.
name
.
should
==
'BananaLib'
@project
.
targets
.
first
.
name
.
should
==
'BananaLib'
end
end
it
'adds the resource bundle targets'
do
describe
'resource bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
before
do
@installer
.
install!
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-banana_bundle'
}
@installer
.
install!
bundle_target
.
should
.
be
.
an
.
instance_of
Xcodeproj
::
Project
::
Object
::
PBXNativeTarget
@bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-banana_bundle'
}
bundle_target
.
product_reference
.
name
.
should
==
'banana_bundle.bundle'
end
bundle_target
.
product_reference
.
path
.
should
==
'banana_bundle.bundle'
end
it
'adds the build configurations to the resources bundle targets'
do
it
'adds the resource bundle targets'
do
@pod_target
.
file_accessors
.
first
.
stubs
(
:resource_bundles
).
returns
(
'banana_bundle'
=>
[])
@bundle_target
.
should
.
be
.
an
.
instance_of
Xcodeproj
::
Project
::
Object
::
PBXNativeTarget
@installer
.
install!
@bundle_target
.
product_reference
.
name
.
should
==
'banana_bundle.bundle'
bundle_target
=
@project
.
targets
.
find
{
|
t
|
t
.
name
==
'BananaLib-banana_bundle'
}
@bundle_target
.
product_reference
.
path
.
should
==
'banana_bundle.bundle'
end
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
it
'adds the build configurations to the resources bundle targets'
do
bundle_target
.
build_configurations
.
each
do
|
bc
|
file
=
config
.
sandbox
.
root
+
@pod_target
.
xcconfig_path
bc
.
base_configuration_reference
.
real_path
.
should
==
file
@bundle_target
.
build_configurations
.
each
do
|
bc
|
bc
.
base_configuration_reference
.
real_path
.
should
==
file
end
end
end
end
end
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