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
7db18a2f
Commit
7db18a2f
authored
Feb 29, 2012
by
Luke Redpath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This is really more of a functional spec right now
parent
813bdac9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
2 deletions
+61
-2
Rakefile
Rakefile
+2
-2
project_integration_spec.rb
spec/functional/project_integration_spec.rb
+59
-0
No files found.
Rakefile
View file @
7db18a2f
...
@@ -57,8 +57,8 @@ end
...
@@ -57,8 +57,8 @@ end
namespace
:spec
do
namespace
:spec
do
desc
"Run the unit specs"
desc
"Run the unit specs"
task
:unit
=>
"ext:cleanbuild"
do
task
:unit
do
sh
"bacon spec/unit/*
*/*_spec.rb
"
sh
"bacon spec/unit/*
_spec.rb spec/unit/**/*_spec.rb -q
"
end
end
desc
"Run the functional specs"
desc
"Run the functional specs"
...
...
spec/functional/project_integration_spec.rb
0 → 100644
View file @
7db18a2f
require
File
.
expand_path
(
'../../spec_helper'
,
__FILE__
)
describe
Pod
::
ProjectIntegration
do
before
do
@sample_project_path
=
SpecHelper
.
create_sample_app_copy_from_fixture
(
'SampleProject'
)
Pod
::
ProjectIntegration
.
integrate_with_project
(
@sample_project_path
)
@sample_project
=
Xcodeproj
::
Project
.
new
(
@sample_project_path
)
end
it
'creates a workspace with a name matching the project'
do
workspace_path
=
@sample_project_path
.
dirname
+
"SampleProject.xcworkspace"
workspace_path
.
should
.
exist
end
it
'adds the project being integrated to the workspace'
do
workspace
=
Xcodeproj
::
Workspace
.
new_from_xcworkspace
(
@sample_project_path
.
dirname
+
"SampleProject.xcworkspace"
)
workspace
.
should
.
include?
(
"SampleProject.xcodeproj"
)
end
it
'adds the Pods project to the workspace'
do
workspace
=
Xcodeproj
::
Workspace
.
new_from_xcworkspace
(
@sample_project_path
.
dirname
+
"SampleProject.xcworkspace"
)
workspace
.
projpaths
.
find
{
|
path
|
path
=~
/Pods.xcodeproj/
}.
should
.
not
.
be
.
nil
end
it
'adds the Pods xcconfig file to the project'
do
@sample_project
.
files
.
where
(
:path
=>
"Pods/Pods.xcconfig"
).
should
.
not
.
be
.
nil
end
it
'sets the Pods xcconfig as the base config for each build configuration'
do
xcconfig_file
=
@sample_project
.
files
.
where
(
:path
=>
"Pods/Pods.xcconfig"
)
@sample_project
.
targets
.
each
do
|
target
|
target
.
buildConfigurations
.
each
do
|
config
|
config
.
baseConfiguration
.
should
==
xcconfig_file
end
end
end
it
'adds a reference to the libPods static library'
do
static_lib
=
@sample_project
.
files
.
where
(
:name
=>
"libPods.a"
)
static_lib
.
should
.
not
.
be
.
nil
end
it
'adds the libPods static library to the "Link binary with libraries" build phase of each target'
do
@sample_project
.
targets
.
each
do
|
target
|
framework_build_phase
=
target
.
frameworks_build_phases
.
first
framework_build_phase
.
files
.
where
(
:file
=>
{
:name
=>
'libPods.a'
}).
should
.
not
.
be
.
nil
end
end
it
'adds a Copy Pods Resources build phase to each target'
do
@sample_project
.
targets
.
each
do
|
target
|
expected_phase
=
target
.
shell_script_build_phases
.
where
(
:name
=>
"Copy Pods Resources"
)
expected_phase
.
shellScript
.
strip
.
should
==
"
\"
${SRCROOT}/Pods/Pods-resources.sh
\"
"
.
strip
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