summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-02 01:15:57 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-04 22:17:48 +0100
commit90de727666e8d6e7c1fd850a03c63b16810182dd (patch)
treee1c817e2cb25cc79c365299b7db3cba4339f2e44
parentb8b82f186d069cb2942edd27756473b95945463d (diff)
downloadbundler-90de727666e8d6e7c1fd850a03c63b16810182dd.tar.gz
Prefer `bundle!` to `bundle` in more places
-rw-r--r--spec/commands/info_spec.rb20
-rw-r--r--spec/commands/show_spec.rb26
2 files changed, 23 insertions, 23 deletions
diff --git a/spec/commands/info_spec.rb b/spec/commands/info_spec.rb
index 881f66d440..17669a0d30 100644
--- a/spec/commands/info_spec.rb
+++ b/spec/commands/info_spec.rb
@@ -13,13 +13,13 @@ RSpec.describe "bundle info" do
it "creates a Gemfile.lock when invoked with a gem name" do
FileUtils.rm("Gemfile.lock")
- bundle "info rails"
+ bundle! "info rails"
expect(bundled_app("Gemfile.lock")).to exist
end
it "prints information if gem exists in bundle" do
- bundle "info rails"
+ bundle! "info rails"
expect(out).to include "* rails (2.3.2)
\tSummary: This is just a fake gem for testing
\tHomepage: http://example.com
@@ -27,12 +27,12 @@ RSpec.describe "bundle info" do
end
it "prints path if gem exists in bundle" do
- bundle "info rails --path"
+ bundle! "info rails --path"
expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
it "prints the path to the running bundler" do
- bundle "info bundler --path"
+ bundle! "info bundler --path"
expect(out).to eq(root.to_s)
end
@@ -43,7 +43,7 @@ RSpec.describe "bundle info" do
context "given a default gem shippped in ruby", :ruby_repo do
it "prints information about the default gem" do
- bundle "info rdoc"
+ bundle! "info rdoc"
expect(out).to include("* rdoc")
expect(out).to include("Default Gem: yes")
end
@@ -51,7 +51,7 @@ RSpec.describe "bundle info" do
context "given a gem with metadata" do
it "prints the gem metadata" do
- bundle "info has_metadata"
+ bundle! "info has_metadata"
expect(out).to include "* has_metadata (1.0)
\tSummary: This is just a fake gem for testing
\tHomepage: http://example.com
@@ -92,7 +92,7 @@ RSpec.describe "bundle info" do
G
expect(the_bundle).to include_gems "foo 1.0"
- bundle "info foo"
+ bundle! "info foo"
expect(out).to include("foo (1.0 #{@git.ref_for("master", 6)}")
end
@@ -107,7 +107,7 @@ RSpec.describe "bundle info" do
G
expect(the_bundle).to include_gems "foo 1.0.omg"
- bundle "info foo"
+ bundle! "info foo"
expect(out).to include("foo (1.0 #{@git.ref_for("omg", 6)}")
end
@@ -117,7 +117,7 @@ RSpec.describe "bundle info" do
gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{sha}"
G
- bundle "info foo"
+ bundle! "info foo"
expect(out).to include("foo (1.0 #{sha[0..6]})")
end
@@ -141,7 +141,7 @@ RSpec.describe "bundle info" do
gem "rack-obama"
G
- bundle "info rac"
+ bundle! "info rac"
expect(out).to eq "1 : rack\n2 : rack-obama\n0 : - exit -\n>"
end
end
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 61b8f73e7f..f9297f770a 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
it "creates a Gemfile.lock if one did not exist" do
FileUtils.rm("Gemfile.lock")
- bundle "show"
+ bundle! "show"
expect(bundled_app("Gemfile.lock")).to exist
end
@@ -20,18 +20,18 @@ RSpec.describe "bundle show", :bundler => "< 3" do
it "creates a Gemfile.lock when invoked with a gem name" do
FileUtils.rm("Gemfile.lock")
- bundle "show rails"
+ bundle! "show rails"
expect(bundled_app("Gemfile.lock")).to exist
end
it "prints path if gem exists in bundle" do
- bundle "show rails"
+ bundle! "show rails"
expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
it "prints path if gem exists in bundle (with --paths option)" do
- bundle "show rails --paths"
+ bundle! "show rails --paths"
expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
@@ -45,7 +45,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
end
it "prints the path to the running bundler" do
- bundle "show bundler"
+ bundle! "show bundler"
expect(out).to eq(root.to_s)
end
@@ -55,7 +55,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
end
it "prints path of all gems in bundle sorted by name" do
- bundle "show --paths"
+ bundle! "show --paths"
expect(out).to include(default_bundle_path("gems", "rake-12.3.2").to_s)
expect(out).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
@@ -66,7 +66,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
end
it "prints summary of gems" do
- bundle "show --verbose"
+ bundle! "show --verbose"
expect(out).to include <<~MSG
* actionmailer (2.3.2)
@@ -77,7 +77,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
end
it "includes bundler in the summary of gems" do
- bundle "show --verbose"
+ bundle! "show --verbose"
expect(out).to include <<~MSG
* bundler (#{Bundler::VERSION})
@@ -99,7 +99,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
G
expect(the_bundle).to include_gems "foo 1.0"
- bundle :show
+ bundle! :show
expect(out).to include("foo (1.0 #{@git.ref_for("master", 6)}")
end
@@ -114,7 +114,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
G
expect(the_bundle).to include_gems "foo 1.0.omg"
- bundle :show
+ bundle! :show
expect(out).to include("foo (1.0 #{@git.ref_for("omg", 6)}")
end
@@ -124,7 +124,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{sha}"
G
- bundle :show
+ bundle! :show
expect(out).to include("foo (1.0 #{sha[0..6]})")
end
@@ -161,7 +161,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
G
bundle "config set auto_install 1"
- bundle :show
+ bundle! :show
expect(out).to include("Installing foo 1.0")
end
@@ -173,7 +173,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do
gem "rack-obama"
G
- bundle "show rac"
+ bundle! "show rac"
expect(out).to eq "1 : rack\n2 : rack-obama\n0 : - exit -\n>"
end
end