diff options
author | Terence Lee <hone02@gmail.com> | 2012-10-09 16:50:55 -1000 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2012-10-09 16:51:54 -1000 |
commit | 944a78293b0bc0f508a70ee99530d251297c5bcc (patch) | |
tree | 241595f7f787339e934b1c89cda83a287faa1c3b /spec/update | |
parent | 3fa809a13eeded67b1e8b3e421071f40c1f4b8f4 (diff) | |
download | bundler-944a78293b0bc0f508a70ee99530d251297c5bcc.tar.gz |
change to new expect syntax for rspec
Diffstat (limited to 'spec/update')
-rw-r--r-- | spec/update/gems_spec.rb | 20 | ||||
-rw-r--r-- | spec/update/git_spec.rb | 20 | ||||
-rw-r--r-- | spec/update/source_spec.rb | 2 |
3 files changed, 21 insertions, 21 deletions
diff --git a/spec/update/gems_spec.rb b/spec/update/gems_spec.rb index 210f48c6..d94f4e05 100644 --- a/spec/update/gems_spec.rb +++ b/spec/update/gems_spec.rb @@ -29,19 +29,19 @@ describe "bundle update" do 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 @@ -59,11 +59,11 @@ describe "bundle update" do describe "with a unknown dependency" do it "should inform the user" do bundle "update halting-problem-solver", :expect_err=>true - out.should include "Could not find gem 'halting-problem-solver'" + expect(out).to include "Could not find gem 'halting-problem-solver'" end it "should suggest alternatives" do bundle "update active-support", :expect_err=>true - out.should include "Did you mean activesupport?" + expect(out).to include "Did you mean activesupport?" end end @@ -72,7 +72,7 @@ describe "bundle update" 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 @@ -133,13 +133,13 @@ describe "bundle update when a gem depends on a newer version of bundler" do 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 diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb index cd15b5c5..37a0b04b 100644 --- a/spec/update/git_spec.rb +++ b/spec/update/git_spec.rb @@ -32,7 +32,7 @@ describe "bundle update" do G bundle "update rails" - out.should include("Using activesupport (3.0) from #{lib_path('rails')} (at master)") + expect(out).to include("Using activesupport (3.0) from #{lib_path('rails')} (at master)") should_be_installed "rails 3.0", "activesupport 3.0" end @@ -89,9 +89,9 @@ describe "bundle update" do gem "foo", "1.0", :git => "#{lib_path('foo_two')}" G - err.should be_empty - out.should include("Fetching #{lib_path}/foo_two") - out.should include("Your bundle is complete!") + expect(err).to be_empty + expect(out).to include("Fetching #{lib_path}/foo_two") + expect(out).to include("Your bundle is complete!") end @@ -114,7 +114,7 @@ describe "bundle update" do G bundle "update", :exitstatus => true - exitstatus.should == 0 + expect(exitstatus).to eq(0) end describe "with submodules" do @@ -145,7 +145,7 @@ describe "bundle update" do G run "require 'submodule'" - out.should eq('GEM') + expect(out).to eq('GEM') install_gemfile <<-G git "#{lib_path('has_submodule-1.0')}", :submodules => true do @@ -154,7 +154,7 @@ describe "bundle update" do G run "require 'submodule'" - out.should == 'GIT' + expect(out).to eq('GIT') end it "it unlocks the source when submodules is removed from git source" do @@ -166,7 +166,7 @@ describe "bundle update" do G run "require 'submodule'" - out.should eq('GIT') + expect(out).to eq('GIT') install_gemfile <<-G git "#{lib_path('has_submodule-1.0')}" do @@ -175,7 +175,7 @@ describe "bundle update" do G run "require 'submodule'" - out.should == 'GEM' + expect(out).to eq('GEM') end end @@ -189,7 +189,7 @@ describe "bundle update" do lib_path("foo-1.0").join(".git").rmtree bundle :update, :expect_err => true - out.should include(lib_path("foo-1.0").to_s) + expect(out).to include(lib_path("foo-1.0").to_s) end end diff --git a/spec/update/source_spec.rb b/spec/update/source_spec.rb index 6e4d1b32..6134c770 100644 --- a/spec/update/source_spec.rb +++ b/spec/update/source_spec.rb @@ -28,7 +28,7 @@ describe "bundle update" do puts "WIN" if defined?(FOO_PREV_REF) RUBY - out.should == "WIN" + expect(out).to eq("WIN") end end |