diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-23 17:32:33 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:30:00 +0900 |
commit | 2b7e39f364d76c74af6e04aa3d96888a6aeef1cd (patch) | |
tree | 5e7a8c37f3d6e3f753f307f0835e51fdaa74f035 /spec/bundler/cache/path_spec.rb | |
parent | 267a72be800da0ec47f441d7d8210dc6aec137af (diff) | |
download | ruby-2b7e39f364d76c74af6e04aa3d96888a6aeef1cd.tar.gz |
[bundler/bundler] Always set `cache_all` via config during tests
So that the behavior is the same regardless of the tested bundler
version.
https://github.com/bundler/bundler/commit/664549427a
Diffstat (limited to 'spec/bundler/cache/path_spec.rb')
-rw-r--r-- | spec/bundler/cache/path_spec.rb | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/spec/bundler/cache/path_spec.rb b/spec/bundler/cache/path_spec.rb index 0d7b154a37..3bbd7b1805 100644 --- a/spec/bundler/cache/path_spec.rb +++ b/spec/bundler/cache/path_spec.rb @@ -9,7 +9,8 @@ gem "foo", :path => '#{bundled_app("lib/foo")}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle "config set cache_all true" + bundle cmd expect(bundled_app("vendor/cache/foo-1.0")).not_to exist expect(the_bundle).to include_gems "foo 1.0" end @@ -21,7 +22,8 @@ gem "foo", :path => '#{lib_path("foo-1.0")}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle "config set cache_all true" + bundle cmd expect(bundled_app("vendor/cache/foo-1.0")).to exist expect(bundled_app("vendor/cache/foo-1.0/.bundlecache")).to be_file @@ -39,7 +41,8 @@ gem "#{libname}", :path => '#{libpath}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle "config set cache_all true" + bundle cmd expect(bundled_app("vendor/cache/#{libname}")).to exist expect(bundled_app("vendor/cache/#{libname}/.bundlecache")).to be_file @@ -54,13 +57,14 @@ gem "foo", :path => '#{lib_path("foo-1.0")}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle "config set cache_all true" + bundle cmd build_lib "foo" do |s| s.write "lib/foo.rb", "puts :CACHE" end - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle cmd expect(bundled_app("vendor/cache/foo-1.0")).to exist FileUtils.rm_rf lib_path("foo-1.0") @@ -76,13 +80,14 @@ gem "foo", :path => '#{lib_path("foo-1.0")}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle "config set cache_all true" + bundle cmd install_gemfile <<-G gem "bar", :path => '#{lib_path("bar-1.0")}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle cmd expect(bundled_app("vendor/cache/bar-1.0")).not_to exist end @@ -105,7 +110,8 @@ gem "foo", :path => '#{lib_path("foo-1.0")}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle "config set cache_all true" + bundle cmd build_lib "bar" install_gemfile <<-G @@ -124,7 +130,8 @@ gem "foo", :path => '#{lib_path("foo-1.0")}' G - bundle cmd, forgotten_command_line_options([:all, :cache_all] => true) + bundle "config set cache_all true" + bundle cmd build_lib "baz" gemfile <<-G |