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
ce7c9ce4
Commit
ce7c9ce4
authored
Jan 20, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a spec for APPLICATION_EXTENSION_API_ONLY
parent
b81d8abc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
10 deletions
+29
-10
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+1
-0
installer_spec.rb
spec/unit/installer_spec.rb
+28
-10
No files found.
lib/cocoapods/target/aggregate_target.rb
View file @
ce7c9ce4
...
@@ -55,6 +55,7 @@ module Pod
...
@@ -55,6 +55,7 @@ module Pod
# will be integrated by this target.
# will be integrated by this target.
#
#
def
user_targets
(
project
=
nil
)
def
user_targets
(
project
=
nil
)
return
[]
if
user_project_path
.
nil?
project
||=
Xcodeproj
::
Project
.
open
(
user_project_path
)
project
||=
Xcodeproj
::
Project
.
open
(
user_project_path
)
user_target_uuids
.
map
do
|
uuid
|
user_target_uuids
.
map
do
|
uuid
|
native_target
=
project
.
objects_by_uuid
[
uuid
]
native_target
=
project
.
objects_by_uuid
[
uuid
]
...
...
spec/unit/installer_spec.rb
View file @
ce7c9ce4
...
@@ -418,26 +418,44 @@ module Pod
...
@@ -418,26 +418,44 @@ module Pod
#--------------------------------------#
#--------------------------------------#
describe
'#set_target_dependencies'
do
describe
'#set_target_dependencies'
do
it
'sets resource bundles for not build pods as target dependencies of the user target'
do
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
@installer
.
podfile
)
pod_target
=
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
)
@pod_target
=
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
)
pod_target
.
stubs
(
:resource_bundle_targets
).
returns
([
'dummy'
])
@target
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
pod_target
.
stubs
(
:should_build?
=>
false
)
target
=
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
mock_target
=
mock
(
'PodNativeTarget'
)
@mock_target
=
mock
(
'PodNativeTarget'
)
mock_target
.
expects
(
:add_dependency
).
with
(
'dummy'
)
mock_project
=
mock
(
'PodsProject'
,
:frameworks_group
=>
mock
(
'FrameworksGroup'
))
mock_project
=
mock
(
'PodsProject'
,
:frameworks_group
=>
mock
(
'FrameworksGroup'
))
@installer
.
stubs
(
:pods_project
).
returns
(
mock_project
)
@installer
.
stubs
(
:pods_project
).
returns
(
mock_project
)
target
.
stubs
(
:native_target
).
returns
(
mock_target
)
@target
.
stubs
(
:native_target
).
returns
(
@mock_target
)
target
.
stubs
(
:pod_targets
).
returns
([
pod_target
])
@target
.
stubs
(
:pod_targets
).
returns
([
@pod_target
])
@installer
.
stubs
(
:aggregate_targets
).
returns
([
target
])
@installer
.
stubs
(
:aggregate_targets
).
returns
([
@target
])
end
it
'sets resource bundles for not build pods as target dependencies of the user target'
do
@pod_target
.
stubs
(
:resource_bundle_targets
).
returns
([
'dummy'
])
@pod_target
.
stubs
(
:should_build?
=>
false
)
@mock_target
.
expects
(
:add_dependency
).
with
(
'dummy'
)
@installer
.
send
(
:set_target_dependencies
)
@installer
.
send
(
:set_target_dependencies
)
end
end
it
'configures APPLICATION_EXTENSION_API_ONLY for app extension targets'
do
mock_user_target
=
mock
(
'UserTarget'
,
:symbol_type
=>
:app_extension
)
@target
.
stubs
(
:user_targets
).
returns
([
mock_user_target
])
build_settings
=
{}
mock_configuration
=
mock
(
'BuildConfiguration'
,
:build_settings
=>
build_settings
)
@mock_target
.
stubs
(
:build_configurations
).
returns
([
mock_configuration
])
@installer
.
send
(
:set_target_dependencies
)
build_settings
.
should
==
{
'APPLICATION_EXTENSION_API_ONLY'
=>
'YES'
}
end
xit
'sets the pod targets as dependencies of the aggregate target'
do
xit
'sets the pod targets as dependencies of the aggregate target'
do
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