spec/update/gems_spec.rb in bundler-1.2.5 vs spec/update/gems_spec.rb in bundler-1.3.0.pre

- old
+ new

@@ -27,23 +27,23 @@ gem "activesupport" gem "rack-obama" exit! G bundle "update" - bundled_app("Gemfile.lock").should exist + expect(bundled_app("Gemfile.lock")).to exist end end describe "--quiet argument" do it 'shows UI messages without --quiet argument' do bundle "update" - out.should include("Fetching source") + expect(out).to include("Fetching source") end it 'does not show UI messages with --quiet argument' do bundle "update --quiet" - out.should_not include("Fetching source") + expect(out).not_to include("Fetching source") end end describe "with a top level dependency" do it "unlocks all child dependencies that are unrelated to other locked dependencies" do @@ -54,16 +54,27 @@ bundle "update rack-obama" should_be_installed "rack 1.2", "rack-obama 1.0", "activesupport 2.3.5" end end + describe "with a unknown dependency" do + it "should inform the user" do + bundle "update halting-problem-solver", :expect_err=>true + expect(out).to include "Could not find gem 'halting-problem-solver'" + end + it "should suggest alternatives" do + bundle "update active-support", :expect_err=>true + expect(out).to include "Did you mean activesupport?" + end + end + describe "with --local option" do it "doesn't hit repo2" do FileUtils.rm_rf(gem_repo2) bundle "update --local" - out.should_not match(/Fetching source index/) + expect(out).not_to match(/Fetching source index/) end end end describe "bundle update in more complicated situations" do @@ -120,15 +131,15 @@ G end it "should not explode" do bundle "update" - err.should be_empty + expect(err).to be_empty end it "should explain that bundler conflicted" do bundle "update" - out.should_not =~ /in snapshot/i - out.should =~ /current Bundler version/i - out.should =~ /perhaps you need to update bundler/i + expect(out).not_to match(/in snapshot/i) + expect(out).to match(/current Bundler version/i) + expect(out).to match(/perhaps you need to update bundler/i) end end