summaryrefslogtreecommitdiff
path: root/spec/bundler/cache/git_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/cache/git_spec.rb')
-rw-r--r--spec/bundler/cache/git_spec.rb32
1 files changed, 21 insertions, 11 deletions
diff --git a/spec/bundler/cache/git_spec.rb b/spec/bundler/cache/git_spec.rb
index 1348d033e2..85d1d29043 100644
--- a/spec/bundler/cache/git_spec.rb
+++ b/spec/bundler/cache/git_spec.rb
@@ -22,7 +22,8 @@ end
gem "foo", :git => '#{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-#{ref}")).to exist
expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist
expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.bundlecache")).to be_file
@@ -40,7 +41,8 @@ end
G
bundle "install --path vendor/bundle"
- 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-#{ref}")).to exist
expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist
@@ -56,8 +58,9 @@ end
gem "foo", :git => '#{lib_path("foo-1.0")}'
G
- bundle! cmd, forgotten_command_line_options([:all, :cache_all] => true)
- bundle! cmd, forgotten_command_line_options([:all, :cache_all] => true)
+ bundle "config set cache_all true"
+ bundle! cmd
+ bundle! cmd
expect(out).to include "Updating files in vendor/cache"
FileUtils.rm_rf lib_path("foo-1.0")
@@ -72,7 +75,8 @@ end
gem "foo", :git => '#{lib_path("foo-1.0")}'
G
- bundle cmd, forgotten_command_line_options([:all, :cache_all] => true)
+ bundle "config set cache_all true"
+ bundle cmd
update_git "foo" do |s|
s.write "lib/foo.rb", "puts :CACHE"
@@ -82,7 +86,8 @@ end
expect(ref).not_to eq(old_ref)
bundle! "update", :all => true
- 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-#{ref}")).to exist
expect(bundled_app("vendor/cache/foo-1.0-#{old_ref}")).not_to exist
@@ -100,7 +105,8 @@ end
gem "foo", :git => '#{lib_path("foo-1.0")}'
G
- bundle! cmd, forgotten_command_line_options([:all, :cache_all] => true)
+ bundle "config set cache_all true"
+ bundle! cmd
update_git "foo" do |s|
s.write "lib/foo.rb", "puts :CACHE"
@@ -129,7 +135,8 @@ end
bundle %(config set local.foo #{lib_path("foo-1.0")})
bundle "install"
- bundle cmd, forgotten_command_line_options([:all, :cache_all] => true)
+ bundle "config set cache_all true"
+ bundle cmd
expect(bundled_app("vendor/cache/foo-invalid-#{ref}")).to exist
@@ -161,7 +168,8 @@ end
G
ref = git.ref_for("master", 11)
- bundle cmd, forgotten_command_line_options([:all, :cache_all] => true)
+ bundle "config set cache_all true"
+ bundle cmd
expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}")).to exist
expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}/submodule-1.0")).to exist
@@ -187,7 +195,8 @@ end
gem "foo", :git => '#{lib_path("foo-1.0")}'
G
- bundle cmd, forgotten_command_line_options([:all, :cache_all] => true)
+ bundle "config set cache_all true"
+ bundle cmd
bundle cmd
expect(err).not_to include("Your Gemfile contains path and git dependencies.")
@@ -204,7 +213,8 @@ end
install_gemfile <<-G
gem "foo", :git => '#{lib_path("foo-1.0")}'
G
- bundle cmd, forgotten_command_line_options([:all, :cache_all] => true)
+ bundle "config set cache_all true"
+ bundle cmd
ref = git.ref_for("master", 11)
gemspec = bundled_app("vendor/cache/foo-1.0-#{ref}/foo.gemspec").read