Commit 5adce292 authored by Vladimir Pouzanov's avatar Vladimir Pouzanov

Added a spec for download_head issue and no prior cache

parent d723996f
...@@ -72,6 +72,17 @@ module Pod ...@@ -72,6 +72,17 @@ module Pod
downloader.download downloader.download
end end
it "prepares the cache if it does not exist when the HEAD is requested explicitly" do
@pod.top_specification.stubs(:source).returns(
:git => fixture('banana-lib')
)
downloader = Downloader.for_pod(@pod)
downloader.cache_path.rmtree if downloader.cache_path.exist?
downloader.expects(:create_cache).once
downloader.stubs(:clone)
downloader.download_head
end
it "removes the oldest repo if the caches is too big" do it "removes the oldest repo if the caches is too big" do
@pod.top_specification.stubs(:source).returns( @pod.top_specification.stubs(:source).returns(
:git => fixture('banana-lib'), :commit => 'fd56054' :git => fixture('banana-lib'), :commit => 'fd56054'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment