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
583d5448
Commit
583d5448
authored
Apr 15, 2014
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ExternalSources::PathSource] Add specs for relative path detection
parent
23aece25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
path_source_spec.rb
spec/unit/external_sources/path_source_spec.rb
+24
-8
No files found.
spec/unit/external_sources/path_source_spec.rb
View file @
583d5448
...
...
@@ -37,15 +37,14 @@ module Pod
}
end
it
"raises if the podspec cannot be found"
do
@subject
.
stubs
(
:params
).
returns
(
:path
=>
temporary_directory
)
should
.
raise
Informative
do
@subject
.
fetch
(
config
.
sandbox
)
end
.
message
.
should
.
match
/No podspec found for `Reachability` in `
#{
temporary_directory
}
`/
end
describe
"Helpers"
do
it
"raises if the podspec cannot be found"
do
@subject
.
stubs
(
:params
).
returns
(
:path
=>
temporary_directory
)
should
.
raise
Informative
do
@subject
.
fetch
(
config
.
sandbox
)
end
.
message
.
should
.
match
/No podspec found for `Reachability` in `
#{
temporary_directory
}
`/
end
describe
"#podspec_path"
do
it
"handles absolute paths"
do
@subject
.
stubs
(
:params
).
returns
(
:path
=>
fixture
(
'integration/Reachability'
))
path
=
@subject
.
send
(
:podspec_path
)
...
...
@@ -73,6 +72,23 @@ module Pod
path
.
should
==
Pathname
(
ENV
[
'HOME'
])
+
'Reachability/Reachability.podspec'
end
end
describe
'#absolute?'
do
it
'returns that a path is relative'
do
result
=
@subject
.
send
(
:absolute?
,
'./ThirdPartyCode/UrbanAirship'
)
result
.
should
.
be
.
false
end
it
'returns that a path is absolute'
do
result
=
@subject
.
send
(
:absolute?
,
'/path/to/UrbanAirship'
)
result
.
should
.
be
.
true
end
it
'considers absolute paths specified with the tilde'
do
result
=
@subject
.
send
(
:absolute?
,
'~/path/to/UrbanAirship'
)
result
.
should
.
be
.
true
end
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