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
a738212b
Commit
a738212b
authored
May 10, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Adapt changes by using more spec helpers
parent
d4595215
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
18 deletions
+6
-18
private_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
+3
-6
public_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
+1
-8
file_references_installer_spec.rb
spec/unit/installer/file_references_installer_spec.rb
+2
-4
No files found.
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
View file @
a738212b
...
@@ -7,14 +7,11 @@ module Pod
...
@@ -7,14 +7,11 @@ module Pod
describe
'in general'
do
describe
'in general'
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@consumer
=
@spec
.
consumer
(
:ios
)
@pod_target
=
fixture_pod_target
(
@spec
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@consumer
=
@pod_target
.
spec_consumers
.
first
@pod_target
=
PodTarget
.
new
([
@spec
],
[
target_definition
],
config
.
sandbox
)
@podfile
=
@pod_target
.
podfile
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
public_xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework SystemConfiguration'
)
public_xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework SystemConfiguration'
)
@generator
=
PrivatePodXCConfig
.
new
(
@pod_target
,
public_xcconfig
)
@generator
=
PrivatePodXCConfig
.
new
(
@pod_target
,
public_xcconfig
)
@podfile
=
Podfile
.
new
@pod_target
.
target_definition
.
stubs
(
:podfile
).
returns
(
@podfile
)
@xcconfig
=
@generator
.
generate
@xcconfig
=
@generator
.
generate
end
end
...
...
spec/unit/generator/xcconfig/public_pod_xcconfig_spec.rb
View file @
a738212b
...
@@ -6,23 +6,16 @@ module Pod
...
@@ -6,23 +6,16 @@ module Pod
describe
PublicPodXCConfig
do
describe
PublicPodXCConfig
do
before
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@target_definition
=
Podfile
::
TargetDefinition
.
new
(
'Pods'
,
nil
)
@pod_target
=
fixture_pod_target
(
@spec
)
@pod_target
=
PodTarget
.
new
([
@spec
],
[
@target_definition
],
config
.
sandbox
)
@pod_target
.
stubs
(
:platform
).
returns
(
:ios
)
@generator
=
PublicPodXCConfig
.
new
(
@pod_target
)
@generator
=
PublicPodXCConfig
.
new
(
@pod_target
)
@podfile
=
Podfile
.
new
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
frameworks
=
[
'QuartzCore'
]
@spec
.
frameworks
=
[
'QuartzCore'
]
@spec
.
weak_frameworks
=
[
'iAd'
]
@spec
.
weak_frameworks
=
[
'iAd'
]
@spec
.
libraries
=
[
'xml2'
]
@spec
.
libraries
=
[
'xml2'
]
file_accessors
=
[
Sandbox
::
FileAccessor
.
new
(
fixture
(
'banana-lib'
),
@spec
.
consumer
(
:ios
))]
# vendored_framework_paths = [config.sandbox.root + 'BananaLib/BananaLib.framework']
# vendored_framework_paths = [config.sandbox.root + 'BananaLib/BananaLib.framework']
# Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).returns(vendored_framework_paths)
# Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).returns(vendored_framework_paths)
@pod_target
.
target_definition
.
stubs
(
:podfile
).
returns
(
@podfile
)
@pod_target
.
stubs
(
:file_accessors
).
returns
(
file_accessors
)
@xcconfig
=
@generator
.
generate
@xcconfig
=
@generator
.
generate
end
end
...
...
spec/unit/installer/file_references_installer_spec.rb
View file @
a738212b
...
@@ -3,10 +3,8 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -3,10 +3,8 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Installer
::
FileReferencesInstaller
do
describe
Installer
::
FileReferencesInstaller
do
before
do
before
do
@file_accessor
=
fixture_file_accessor
(
'banana-lib/BananaLib.podspec'
)
@pod_target
=
fixture_pod_target
(
'banana-lib/BananaLib.podspec'
)
@pod_target
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
@file_accessor
=
@pod_target
.
file_accessors
.
first
@pod_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
@pod_target
.
file_accessors
=
[
@file_accessor
]
@project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
@project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
@project
.
add_pod_group
(
'BananaLib'
,
fixture
(
'banana-lib'
))
@project
.
add_pod_group
(
'BananaLib'
,
fixture
(
'banana-lib'
))
@installer
=
Installer
::
FileReferencesInstaller
.
new
(
config
.
sandbox
,
[
@pod_target
],
@project
)
@installer
=
Installer
::
FileReferencesInstaller
.
new
(
config
.
sandbox
,
[
@pod_target
],
@project
)
...
...
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