summaryrefslogtreecommitdiff
path: root/spec/bundler/cache
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 13:20:25 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 17:19:02 +0900
commitd386a58f6f1865aaa35eda5af55cff3ff3cca4ca (patch)
tree0665fe806540deae7f8e52095af6dba70f940aa3 /spec/bundler/cache
parent7ffd14a18c341565afaf80d259f9fe5df8a13d29 (diff)
Merge bundler-2.2.0.rc.2
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3659
Diffstat (limited to 'spec/bundler/cache')
-rw-r--r--spec/bundler/cache/git_spec.rb26
-rw-r--r--spec/bundler/cache/path_spec.rb16
2 files changed, 14 insertions, 28 deletions
diff --git a/spec/bundler/cache/git_spec.rb b/spec/bundler/cache/git_spec.rb
index d481e00666..97d73907db 100644
--- a/spec/bundler/cache/git_spec.rb
+++ b/spec/bundler/cache/git_spec.rb
@@ -174,32 +174,6 @@ RSpec.describe "bundle cache with git" do
expect(the_bundle).to include_gems "has_submodule 1.0"
end
- it "displays warning message when detecting git repo in Gemfile", :bundler => "< 3" do
- build_git "foo"
-
- install_gemfile <<-G
- gem "foo", :git => '#{lib_path("foo-1.0")}'
- G
-
- bundle :cache
-
- expect(err).to include("Your Gemfile contains path and git dependencies.")
- end
-
- it "does not display warning message if cache_all is set in bundle config" do
- build_git "foo"
-
- install_gemfile <<-G
- gem "foo", :git => '#{lib_path("foo-1.0")}'
- G
-
- bundle "config set cache_all true"
- bundle :cache
- bundle :cache
-
- expect(err).not_to include("Your Gemfile contains path and git dependencies.")
- end
-
it "caches pre-evaluated gemspecs" do
git = build_git "foo"
diff --git a/spec/bundler/cache/path_spec.rb b/spec/bundler/cache/path_spec.rb
index 0c84d242b5..c81dda7405 100644
--- a/spec/bundler/cache/path_spec.rb
+++ b/spec/bundler/cache/path_spec.rb
@@ -91,7 +91,7 @@ RSpec.describe "bundle cache with path" do
expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
end
- it "raises a warning without --all", :bundler => "< 3" do
+ it "does not cache path gems by default", :bundler => "< 3" do
build_lib "foo"
install_gemfile <<-G
@@ -99,10 +99,22 @@ RSpec.describe "bundle cache with path" do
G
bundle :cache
- expect(err).to match(/please pass the \-\-all flag/)
+ expect(err).to be_empty
expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
end
+ it "caches path gems by default", :bundler => "3" do
+ build_lib "foo"
+
+ install_gemfile <<-G
+ gem "foo", :path => '#{lib_path("foo-1.0")}'
+ G
+
+ bundle :cache
+ expect(err).to be_empty
+ expect(bundled_app("vendor/cache/foo-1.0")).to exist
+ end
+
it "stores the given flag" do
build_lib "foo"