Skip to content

Commit

Permalink
add test for bundle install --no-cache, fix --no-cache option
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Jan 19, 2011
1 parent 3af9a88 commit 36f1594
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/cli.rb
Expand Up @@ -223,7 +223,7 @@ def install(path = nil)
Bundler.ui.be_quiet! if opts[:quiet]

Installer.install(Bundler.root, Bundler.definition, opts)
Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options[:no_cache]
Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options["no-cache"]

if Bundler.settings[:path]
relative_path = Bundler.settings[:path]
Expand Down
12 changes: 12 additions & 0 deletions spec/install/gems/packed_spec.rb
Expand Up @@ -68,5 +68,17 @@
out.should == "1.0.0 RUBY"
end
end

fit "does not update the cache if --no-cache is passed" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
G
bundled_app("vendor/cache").mkpath
bundled_app("vendor/cache").children.should be_empty

bundle "install --no-cache"
bundled_app("vendor/cache").children.should be_empty
end
end
end

0 comments on commit 36f1594

Please sign in to comment.