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
266ba22c
Commit
266ba22c
authored
Aug 21, 2014
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AbstracExternalSource] Add spec for JSON podspecs
parent
59a198e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
abstract_external_source_spec.rb
spec/unit/external_sources/abstract_external_source_spec.rb
+12
-18
No files found.
spec/unit/external_sources/abstract_external_source_spec.rb
View file @
266ba22c
...
...
@@ -35,12 +35,11 @@ module Pod
describe
'Subclasses helpers'
do
it
'pre-downloads the Pod and stores the relevant information in the sandbox'
do
sandbox
=
config
.
sandbox
@subject
.
send
(
:pre_download
,
sandbox
)
@subject
.
send
(
:pre_download
,
config
.
sandbox
)
path
=
config
.
sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
path
.
should
.
exist?
sandbox
.
predownloaded_pods
.
should
==
[
'Reachability'
]
sandbox
.
checkout_sources
.
should
==
{
config
.
sandbox
.
predownloaded_pods
.
should
==
[
'Reachability'
]
config
.
sandbox
.
checkout_sources
.
should
==
{
'Reachability'
=>
{
:git
=>
fixture
(
'integration/Reachability'
),
:commit
=>
'4ec575e4b074dcc87c44018cce656672a979b34a'
,
...
...
@@ -48,20 +47,15 @@ module Pod
}
end
it
"pre-downloads the Pod with a JSON podspec and stores the relevant information in the sandbox"
do
dependency
=
Dependency
.
new
(
"Reachability"
,
:git
=>
fixture
(
'integration/Reachability'
),
:branch
=>
'json_podspec'
)
source
=
ExternalSources
.
from_dependency
(
dependency
,
nil
)
sandbox
=
config
.
sandbox
source
.
send
(
:pre_download
,
sandbox
)
path
=
config
.
sandbox
.
root
+
'Local Podspecs/Reachability.podspec'
path
.
should
.
exist?
sandbox
.
predownloaded_pods
.
should
==
[
"Reachability"
]
sandbox
.
checkout_sources
.
should
==
{
"Reachability"
=>
{
:git
=>
fixture
(
'integration/Reachability'
),
:commit
=>
"4ec575e4b074dcc87c44018cce656672a979b34a"
}
}
it
"checks for JSON podspecs"
do
path
=
config
.
sandbox
.
root
+
'Reachability'
podspec_path
=
path
+
'Reachability.podspec.json'
Dir
.
mkdir
(
path
)
File
.
open
(
podspec_path
,
"w"
)
{}
Pathname
.
any_instance
.
stubs
(
:rmtree
)
Downloader
::
Git
.
any_instance
.
stubs
(
:download
)
config
.
sandbox
.
expects
(
:store_podspec
).
with
(
'Reachability'
,
podspec_path
,
true
,
true
)
@subject
.
send
(
:pre_download
,
config
.
sandbox
)
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