summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/update_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-06-03 20:45:36 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-18 19:14:15 +0900
commit1436b5026cd1b2ac4b428955aeadaac8e8b12b1b (patch)
tree14f9fa8724d3a96b0b221a39d0e1cbd9cd125197 /spec/bundler/commands/update_spec.rb
parent481840ff18b2d66b20a42240829e06829c34f8f7 (diff)
[rubygems/rubygems] s/bundle!/bundle
https://github.com/rubygems/rubygems/commit/746a4b3d74
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3212
Diffstat (limited to 'spec/bundler/commands/update_spec.rb')
-rw-r--r--spec/bundler/commands/update_spec.rb60
1 files changed, 30 insertions, 30 deletions
diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb
index 116bcfd18b..9a3bfd28c6 100644
--- a/spec/bundler/commands/update_spec.rb
+++ b/spec/bundler/commands/update_spec.rb
@@ -41,7 +41,7 @@ RSpec.describe "bundle update" do
build_gem "activesupport", "3.0"
end
- bundle! "update", :all => true
+ bundle "update", :all => true
expect(out).to include("Bundle updated!")
expect(the_bundle).to include_gems "rack 1.2", "rack-obama 1.0", "activesupport 3.0"
end
@@ -65,14 +65,14 @@ RSpec.describe "bundle update" do
gem "rack", "1.0"
G
- bundle! "update --gemfile OmgFile", :all => true
+ bundle "update --gemfile OmgFile", :all => true
expect(bundled_app("OmgFile.lock")).to exist
end
end
context "when update_requires_all_flag is set" do
- before { bundle! "config set update_requires_all_flag true" }
+ before { bundle "config set update_requires_all_flag true" }
it "errors when passed nothing" do
install_gemfile! ""
@@ -133,7 +133,7 @@ RSpec.describe "bundle update" do
describe "when a possible resolve requires an older version of a locked gem" do
context "and only_update_to_newer_versions is set" do
before do
- bundle! "config set only_update_to_newer_versions true"
+ bundle "config set only_update_to_newer_versions true"
end
it "does not go to an older version" do
@@ -167,7 +167,7 @@ RSpec.describe "bundle update" do
end
end
- bundle! "update", :all => true
+ bundle "update", :all => true
expect(the_bundle).to include_gems("slim 3.0.9", "slim-rails 3.1.3", "slim_lint 0.16.1")
end
@@ -193,7 +193,7 @@ RSpec.describe "bundle update" do
gem "b", "1.0"
G
- bundle! "update b"
+ bundle "update b"
expect(the_bundle).to include_gems("a 1.0", "b 1.0")
end
@@ -281,7 +281,7 @@ RSpec.describe "bundle update" do
describe "in a frozen bundle" do
it "should fail loudly", :bundler => "< 3" do
- bundle! "install --deployment"
+ bundle "install --deployment"
bundle "update", :all => true, :raise_on_error => false
expect(last_command).to be_failure
@@ -290,14 +290,14 @@ RSpec.describe "bundle update" do
end
it "should suggest different command when frozen is set globally", :bundler => "< 3" do
- bundle! "config set --global frozen 1"
+ bundle "config set --global frozen 1"
bundle "update", :all => true, :raise_on_error => false
expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m).
and match(/freeze \nby running `bundle config unset frozen`./m)
end
it "should suggest different command when frozen is set globally", :bundler => "3" do
- bundle! "config set --global deployment true"
+ bundle "config set --global deployment true"
bundle "update", :all => true, :raise_on_error => false
expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m).
and match(/freeze \nby running `bundle config unset deployment`./m)
@@ -312,7 +312,7 @@ RSpec.describe "bundle update" do
G
update_repo2 { build_gem "activesupport", "3.0" }
- bundle! "update --source activesupport"
+ bundle "update --source activesupport"
expect(the_bundle).to include_gem "activesupport 3.0"
end
@@ -323,12 +323,12 @@ RSpec.describe "bundle update" do
G
update_repo2 { build_gem "activesupport", "3.0" }
- bundle! "update --source activesupport"
+ bundle "update --source activesupport"
expect(the_bundle).not_to include_gem "activesupport 3.0"
end
context "with unlock_source_unlocks_spec set to false" do
- before { bundle! "config set unlock_source_unlocks_spec false" }
+ before { bundle "config set unlock_source_unlocks_spec false" }
it "should not update gems not included in the source that happen to have the same name" do
install_gemfile <<-G
@@ -468,7 +468,7 @@ RSpec.describe "bundle update in more complicated situations" do
build_gem "rack", "10.0"
end
- bundle! "update thin rack-obama"
+ bundle "update thin rack-obama"
expect(last_command.stdboth).to include "Bundler attempted to update rack-obama but its version stayed the same"
expect(the_bundle).to include_gems "thin 2.0", "rack 10.0", "rack-obama 1.0"
end
@@ -484,7 +484,7 @@ RSpec.describe "bundle update in more complicated situations" do
s.write "lib/foo2.rb", "puts :foo2"
end
- bundle! "update foo"
+ bundle "update foo"
expect(last_command.stdboth).not_to include "attempted to update"
end
@@ -501,7 +501,7 @@ RSpec.describe "bundle update in more complicated situations" do
gem "rack"
G
- bundle! "update rack"
+ bundle "update rack"
expect(last_command.stdboth).not_to include "attempted to update"
end
@@ -554,12 +554,12 @@ RSpec.describe "bundle update in more complicated situations" do
end
it "allows updating" do
- bundle! :update, :all => true
+ bundle :update, :all => true
expect(the_bundle).to include_gem "a 1.1"
end
it "allows updating a specific gem" do
- bundle! "update a"
+ bundle "update a"
expect(the_bundle).to include_gem "a 1.1"
end
end
@@ -593,7 +593,7 @@ RSpec.describe "bundle update in more complicated situations" do
end
it "is not updated because it is not actually included in the bundle" do
- bundle! "update a"
+ bundle "update a"
expect(last_command.stdboth).to include "Bundler attempted to update a but it was not considered because it is for a different platform from the current one"
expect(the_bundle).to_not include_gem "a"
end
@@ -638,7 +638,7 @@ RSpec.describe "bundle update when a gem depends on a newer version of bundler"
end
it "should warn that the newer version of Bundler would conflict", :bundler => "3" do
- bundle! "update", :all => true
+ bundle "update", :all => true
expect(err).to include("rails (3.0.1) has dependency bundler").
and include("so the dependency is being ignored")
expect(the_bundle).to include_gem "rails 3.0.1"
@@ -666,7 +666,7 @@ RSpec.describe "bundle update" do
end
context "with suppress_install_using_messages set" do
- before { bundle! "config set suppress_install_using_messages true" }
+ before { bundle "config set suppress_install_using_messages true" }
it "only prints `Using` for versions that have changed" do
build_repo4 do
@@ -680,14 +680,14 @@ RSpec.describe "bundle update" do
gem "foo"
G
- bundle! "update", :all => true
+ bundle "update", :all => true
expect(out).to match(/Resolving dependencies\.\.\.\.*\nBundle updated!/)
update_repo4 do
build_gem "foo", "2.0"
end
- bundle! "update", :all => true
+ bundle "update", :all => true
out.sub!("Removing foo (1.0)\n", "")
expect(out).to match(/Resolving dependencies\.\.\.\.*\nFetching foo 2\.0 \(was 1\.0\)\nInstalling foo 2\.0 \(was 1\.0\)\nBundle updated/)
end
@@ -828,7 +828,7 @@ RSpec.describe "bundle update --bundler" do
FileUtils.rm_r gem_repo4
- bundle! :update, :bundler => true, :verbose => true
+ bundle :update, :bundler => true, :verbose => true
expect(the_bundle).to include_gem "rack 1.0"
expect(the_bundle.locked_gems.bundler_version).to eq v(Bundler::VERSION)
@@ -872,8 +872,8 @@ RSpec.describe "bundle update conservative" do
context "with patch set as default update level in config" do
it "should do a patch level update" do
- bundle! "config set --local prefer_patch true"
- bundle! "update foo"
+ bundle "config set --local prefer_patch true"
+ bundle "update foo"
expect(the_bundle).to include_gems "foo 1.4.5", "bar 2.1.1", "qux 1.0.0"
end
@@ -881,13 +881,13 @@ RSpec.describe "bundle update conservative" do
context "patch preferred" do
it "single gem updates dependent gem to minor" do
- bundle! "update --patch foo"
+ bundle "update --patch foo"
expect(the_bundle).to include_gems "foo 1.4.5", "bar 2.1.1", "qux 1.0.0"
end
it "update all" do
- bundle! "update --patch", :all => true
+ bundle "update --patch", :all => true
expect(the_bundle).to include_gems "foo 1.4.5", "bar 2.1.1", "qux 1.0.1"
end
@@ -895,7 +895,7 @@ RSpec.describe "bundle update conservative" do
context "minor preferred" do
it "single gem updates dependent gem to major" do
- bundle! "update --minor foo"
+ bundle "update --minor foo"
expect(the_bundle).to include_gems "foo 1.5.1", "bar 3.0.0", "qux 1.0.0"
end
@@ -903,13 +903,13 @@ RSpec.describe "bundle update conservative" do
context "strict" do
it "patch preferred" do
- bundle! "update --patch foo bar --strict"
+ bundle "update --patch foo bar --strict"
expect(the_bundle).to include_gems "foo 1.4.4", "bar 2.0.5", "qux 1.0.0"
end
it "minor preferred" do
- bundle! "update --minor --strict", :all => true
+ bundle "update --minor --strict", :all => true
expect(the_bundle).to include_gems "foo 1.5.0", "bar 2.1.1", "qux 1.1.0"
end