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
183f2551
Commit
183f2551
authored
Oct 30, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish up the specs for what a target should have.
parent
441eac88
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
project.rb
lib/cocoapods/xcode/project.rb
+6
-4
project_spec.rb
spec/unit/xcode/project_spec.rb
+13
-3
No files found.
lib/cocoapods/xcode/project.rb
View file @
183f2551
...
...
@@ -81,7 +81,7 @@ module Pod
end
class
PBXFileReference
<
PBXObject
attributes
:path
,
:sourceTree
attributes
:path
,
:sourceTree
,
:explicitFileType
,
:includeInIndex
def
initialize
(
project
,
uuid
,
attributes
)
is_new
=
uuid
.
nil?
...
...
@@ -190,9 +190,11 @@ module Pod
end
class
PBXNativeTarget
<
PBXObject
attributes
:productName
,
:productType
,
:buildRules
,
:dependencies
attributes
:productName
,
:productType
has_many
:buildPhases
,
:class
=>
PBXBuildPhase
has_many
:dependencies
,
:singular
=>
:dependency
# TODO :class => ?
has_many
:buildRules
# TODO :class => ?
has_one
:buildConfigurationList
has_one
:product
,
:uuid
=>
:productReference
...
...
@@ -200,8 +202,8 @@ module Pod
super
self
.
buildPhaseReferences
||=
[]
# TODO self.buildConfigurationList ||= new list?
#self.buildRul
es ||= []
#self.dependenci
es ||= []
self
.
buildRuleReferenc
es
||=
[]
self
.
dependencyReferenc
es
||=
[]
end
end
...
...
spec/unit/xcode/project_spec.rb
View file @
183f2551
...
...
@@ -112,7 +112,6 @@ describe "Pod::Xcode::Project" do
end
it
"returns the xcconfig that this configuration is based on (baseConfigurationReference)"
do
p
@project
.
objects
[
'515160D0141EC5D100EBB823'
]
xcconfig
=
@project
.
objects
.
new
@configuration
.
baseConfiguration
=
xcconfig
@configuration
.
baseConfigurationReference
.
should
==
xcconfig
.
uuid
...
...
@@ -143,8 +142,13 @@ describe "Pod::Xcode::Project" do
it
"returns the product"
do
product
=
@target
.
product
p
product
.
attributes
# TODO continue from here!!
#product.uuid.should == @target.productReference
product
.
uuid
.
should
==
@target
.
productReference
product
.
should
.
be
.
instance_of
Pod
::
Xcode
::
Project
::
PBXFileReference
product
.
path
.
should
==
"libPods.a"
product
.
name
.
should
==
"libPods.a"
product
.
sourceTree
.
should
==
"BUILT_PRODUCTS_DIR"
product
.
explicitFileType
.
should
==
"archive.ar"
product
.
includeInIndex
.
should
==
"0"
end
it
"returns that product type is a static library"
do
...
...
@@ -154,12 +158,18 @@ describe "Pod::Xcode::Project" do
it
"returns the buildConfigurationList"
do
list
=
@target
.
buildConfigurationList
list
.
should
.
be
.
instance_of
Pod
::
Xcode
::
Project
::
XCConfigurationList
list
.
buildConfigurations
.
map
(
&
:name
).
sort
.
should
==
%w{ Debug Release }
@target
.
buildConfigurationListReference
=
nil
@target
.
buildConfigurationList
.
should
==
nil
@target
.
buildConfigurationListReference
=
list
.
uuid
@target
.
buildConfigurationList
.
attributes
.
should
==
list
.
attributes
end
it
"returns an empty list of dependencies and buildRules (not sure yet which classes those are yet)"
do
@target
.
dependencies
.
to_a
.
should
==
[]
@target
.
buildRules
.
to_a
.
should
==
[]
end
describe
"concerning its build phases"
do
extend
SpecHelper
::
TemporaryDirectory
...
...
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