summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmit Shah <who828@gmail.com>2014-04-26 12:54:49 +0530
committerAndre Arko <andre@arko.net>2014-06-15 22:25:32 -0700
commit7f85fa560b795d528ac39ee756c664577ac3b2a4 (patch)
treed19fd1f1bfc733095dbd6261d996b9ff0dc4cd85
parente9473171fa0bfaa7b9ba0b97d2a9e0218d3959d0 (diff)
downloadbundler-7f85fa560b795d528ac39ee756c664577ac3b2a4.tar.gz
Added the test to check if install --local doesn't fetch specs remotely
-rw-r--r--spec/cache/gems_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb
index 3ba98b7730..b70f62743a 100644
--- a/spec/cache/gems_spec.rb
+++ b/spec/cache/gems_spec.rb
@@ -103,6 +103,20 @@ describe "bundle cache" do
expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
expect(bundled_app("vendor/cache/builtin_gem-1.0.2.gem")).to exist
end
+
+ it "doesn't make remote request after caching the gem" do
+ build_gem "builtin_gem_2", "1.0.2", :path => bundled_app('vendor/cache') do |s|
+ s.summary = "This builtin_gem is bundled with Ruby"
+ end
+
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem 'builtin_gem_2', '1.0.2'
+ G
+
+ bundle "install --local"
+ should_be_installed("builtin_gem_2 1.0.2")
+ end
end
describe "when there are also git sources" do