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
edc236c0
Commit
edc236c0
authored
Oct 17, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make specs green.
parent
3f4ed2ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
21 deletions
+8
-21
command_spec.rb
spec/functional/command_spec.rb
+1
-1
integration_spec.rb
spec/integration_spec.rb
+3
-1
installer_spec.rb
spec/unit/installer_spec.rb
+2
-14
specification_spec.rb
spec/unit/specification_spec.rb
+2
-5
No files found.
spec/functional/command_spec.rb
View file @
edc236c0
...
...
@@ -51,7 +51,7 @@ describe "Pod::Command" do
spec
.
authors
.
should
==
{
`git config --get user.name`
.
strip
=>
`git config --get user.email`
.
strip
}
spec
.
source
.
should
==
{
:git
=>
'http://example.com/Bananas.git'
,
:tag
=>
'1.0.0'
}
spec
.
description
.
should
==
'An optional longer description of Bananas.'
spec
.
source_files
.
should
==
[
Pathname
.
new
(
'Classes'
),
Pathname
.
new
(
'Classes/**/*.{h,m}'
)
]
spec
.
source_files
.
should
==
[
'Classes'
,
'Classes/**/*.{h,m}'
]
spec
.
xcconfig
.
to_hash
.
should
==
{
'OTHER_LDFLAGS'
=>
'-framework SomeRequiredFramework'
}
spec
.
dependencies
.
should
==
[
Pod
::
Dependency
.
new
(
'SomeLibraryThatBananasDependsOn'
,
'>= 1.0.0'
)]
end
...
...
spec/integration_spec.rb
View file @
edc236c0
...
...
@@ -109,8 +109,10 @@ else
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
installer
=
Pod
::
Installer
.
new
(
spec
)
installer
.
generate_project
project
=
Pod
::
Xcode
::
Project
.
new
(
config
.
project_pods_root
)
project
.
source_files
.
s
ort
.
should
==
Pod
::
Installer
.
new
(
spec
).
source_files
.
sort
project
.
source_files
.
s
hould
==
installer
.
xcodeproj
.
source_files
end
end
end
...
...
spec/unit/installer_spec.rb
View file @
edc236c0
...
...
@@ -60,29 +60,17 @@ describe "Pod::Installer" do
s
.
dependency
(
name
)
s
.
source_files
=
*
patterns
end
)
destroot
=
stubbed_destroot
(
installer
)
installer
.
generate_project
expected_patterns
.
each
do
|
name
,
pattern
|
expected
=
(
destroot
+
pattern
).
glob
.
map
do
|
file
|
pattern
=
config
.
project_pods_root
+
'ASIHTTPRequest'
+
pattern
expected
=
pattern
.
glob
.
map
do
|
file
|
file
.
relative_path_from
(
config
.
project_pods_root
)
end
installer
.
source_files
[
name
].
size
.
should
==
expected
.
size
installer
.
source_files
[
name
].
sort
.
should
==
expected
.
sort
installer
.
xcodeproj
.
source_files
[
name
].
size
.
should
==
expected
.
size
installer
.
xcodeproj
.
source_files
[
name
].
sort
.
should
==
expected
.
sort
end
installer
.
xcconfig
.
to_hash
.
should
==
xcconfig
end
end
def
stubbed_destroot
(
installer
)
set
=
installer
.
dependent_specification_sets
.
find
{
|
s
|
s
.
name
==
'ASIHTTPRequest'
}
spec
=
set
.
specification
set
.
extend
(
Module
.
new
{
define_method
(
:specification
)
{
spec
}})
def
spec
.
pod_destroot
config
.
project_pods_root
+
'ASIHTTPRequest'
# without name and version
end
spec
.
pod_destroot
end
end
spec/unit/specification_spec.rb
View file @
edc236c0
...
...
@@ -79,10 +79,7 @@ describe "A Pod::Specification loaded from a podspec" do
end
it
"returns the pod's source files"
do
@spec
.
source_files
.
should
==
[
Pathname
.
new
(
'Classes/*.{h,m}'
),
Pathname
.
new
(
'Vendor'
)
]
@spec
.
source_files
.
should
==
[
'Classes/*.{h,m}'
,
'Vendor'
]
end
it
"returns the pod's dependencies"
do
...
...
@@ -109,7 +106,7 @@ describe "A Pod::Specification loaded from a podspec" do
it
"has a shortcut to add libraries to the xcconfig"
do
@spec
.
libraries
=
'z'
,
'xml2'
@spec
.
xcconfig
.
to_hash
.
should
==
{
'OTHER_LDFLAGS'
=>
'-framework SystemConfiguration -l
z -l
xml2'
'OTHER_LDFLAGS'
=>
'-framework SystemConfiguration -l
z -l
xml2'
}
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