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
3ca4216d
Commit
3ca4216d
authored
Mar 14, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TargetIntegrator] Add test for
8d237573
parent
6da6af96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+14
-1
No files found.
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
3ca4216d
...
...
@@ -5,6 +5,11 @@ module Pod
describe
TargetIntegrator
=
Installer
::
UserProjectIntegrator
::
TargetIntegrator
do
describe
"In general"
do
# The project contains a `PBXReferenceProxy` in the build files of the
# frameworks build phase which implicitly checks for the robustness of
# the detection of the target.
#
before
do
sample_project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
@sample_project
=
Xcodeproj
::
Project
.
new
sample_project_path
...
...
@@ -28,10 +33,18 @@ module Pod
it
'returns the targets that need to be integrated'
do
pods_library
=
@sample_project
.
frameworks_group
.
new_static_library
(
'Pods'
)
@target
.
frameworks_build_phase
.
add_file_reference
(
pods_library
)
Xcodeproj
::
Project
.
any_instance
.
stubs
(
:objects_by_uuid
).
returns
(
@target
.
uuid
=>
@targe
t
)
@target_integrator
.
stubs
(
:user_project
).
returns
(
@sample_projec
t
)
@target_integrator
.
targets
.
map
(
&
:name
).
should
.
be
.
empty?
end
it
'is robust against other types of references in the build files of the frameworks build phase'
do
build_file
=
@sample_project
.
new
(
Xcodeproj
::
Project
::
PBXBuildFile
)
build_file
.
file_ref
=
@sample_project
.
new
(
Xcodeproj
::
Project
::
PBXVariantGroup
)
@target_integrator
.
stubs
(
:user_project
).
returns
(
@sample_project
)
@target
.
frameworks_build_phase
.
files
<<
build_file
@target_integrator
.
targets
.
map
(
&
:name
).
should
==
%w[ SampleProject ]
end
it
'does not perform the integration if there are no targets to integrate'
do
@target_integrator
.
stubs
(
:targets
).
returns
([])
@target_integrator
.
expects
(
:add_xcconfig_base_configuration
).
never
...
...
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