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
d0ef6973
Commit
d0ef6973
authored
Apr 05, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Cache] Start specs
parent
b43fc4b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
cache.rb
lib/cocoapods/downloader/cache.rb
+1
-1
cache_spec.rb
spec/unit/downloader/cache_spec.rb
+28
-0
No files found.
lib/cocoapods/downloader/cache.rb
View file @
d0ef6973
...
...
@@ -17,7 +17,7 @@ module Pod
#
def
initialize
(
root
)
@root
=
Pathname
(
root
)
root
.
mkpath
unless
root
.
exist?
@root
.
mkpath
unless
@
root
.
exist?
end
# Downloads the Pod from the given `request`
...
...
spec/unit/downloader/cache_spec.rb
0 → 100644
View file @
d0ef6973
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Downloader
::
Cache
do
before
do
@cache
=
Downloader
::
Cache
.
new
(
Dir
.
mktmpdir
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
)
}
@request
=
Downloader
::
Request
.
new
(
:spec
=>
@spec
,
:released
=>
true
)
end
it
'returns the root'
do
@cache
.
root
.
should
.
be
.
directory?
end
describe
'when the download is not cached'
do
it
'downloads the source'
do
Downloader
::
Git
.
any_instance
.
expects
(
:download
)
Downloader
::
Git
.
any_instance
.
expects
(
:checkout_options
).
returns
(
@spec
.
source
)
@cache
.
download_pod
(
@request
)
end
end
after
do
@cache
.
root
.
rmtree
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