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
17d5bc89
Commit
17d5bc89
authored
Dec 16, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Test frameworks for AggregateXCConfig
parent
e4724166
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
spec_helper.rb
spec/spec_helper.rb
+21
-4
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+0
-0
No files found.
spec/spec_helper.rb
View file @
17d5bc89
...
...
@@ -118,15 +118,32 @@ def fixture_file_accessor(name, platform = :ios)
Pod
::
Sandbox
::
FileAccessor
.
new
(
path_list
,
spec
.
consumer
(
platform
))
end
def
fixture_pod_target
(
name
,
platform
=
:ios
,
target_definition
=
nil
)
spec
=
fixture_spec
(
name
)
target_definition
||=
Pod
::
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
def
fixture_target_definition
(
podfile
=
nil
,
&
block
)
podfile
||=
Pod
::
Podfile
.
new
(
&
block
)
Pod
::
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
podfile
)
end
def
fixture_pod_target
(
spec_or_name
,
platform
=
:ios
,
target_definition
=
nil
)
spec
=
spec_or_name
.
is_a?
(
Pod
::
Specification
)
?
spec_or_name
:
fixture_spec
(
spec_or_name
)
target_definition
||=
fixture_target_definition
target_definition
.
store_pod
(
spec
.
name
)
Pod
::
PodTarget
.
new
([
spec
],
target_definition
,
config
.
sandbox
).
tap
do
|
pod_target
|
pod_target
.
stubs
(
:platform
).
returns
(
platform
)
pod_target
.
file_accessors
<<
fixture_file_accessor
(
name
,
platform
)
pod_target
.
file_accessors
<<
fixture_file_accessor
(
spec
.
defined_in_file
,
platform
)
consumer
=
spec
.
consumer
(
platform
)
pod_target
.
spec_consumers
<<
consumer
end
end
def
fixture_aggregate_target
(
pod_targets
=
[],
platform
=
:ios
,
target_definition
=
nil
)
target_definition
||=
pod_targets
.
map
(
&
:target_definition
).
first
||
fixture_target_definition
target
=
Pod
::
AggregateTarget
.
new
(
target_definition
,
config
.
sandbox
)
target
.
client_root
=
config
.
sandbox
.
root
.
dirname
target
.
stubs
(
:platform
).
returns
(
platform
)
target
.
pod_targets
=
pod_targets
target
end
#-----------------------------------------------------------------------------#
SpecHelper
::
Fixture
.
fixture
(
'banana-lib'
)
# ensure it exists
...
...
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
17d5bc89
This diff is collapsed.
Click to expand it.
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