summaryrefslogtreecommitdiff
path: root/spec/runtime/require_spec.rb
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2012-10-09 16:50:55 -1000
committerTerence Lee <hone02@gmail.com>2012-10-09 16:51:54 -1000
commit944a78293b0bc0f508a70ee99530d251297c5bcc (patch)
tree241595f7f787339e934b1c89cda83a287faa1c3b /spec/runtime/require_spec.rb
parent3fa809a13eeded67b1e8b3e421071f40c1f4b8f4 (diff)
downloadbundler-944a78293b0bc0f508a70ee99530d251297c5bcc.tar.gz
change to new expect syntax for rspec
Diffstat (limited to 'spec/runtime/require_spec.rb')
-rw-r--r--spec/runtime/require_spec.rb48
1 files changed, 24 insertions, 24 deletions
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
index 342deb8c73..349696606b 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -48,32 +48,32 @@ describe "Bundler.require" do
it "requires the gems" do
# default group
run "Bundler.require"
- out.should eq("two")
+ expect(out).to eq("two")
# specific group
run "Bundler.require(:bar)"
- out.should eq("baz\nqux")
+ expect(out).to eq("baz\nqux")
# default and specific group
run "Bundler.require(:default, :bar)"
- out.should eq("baz\nqux\ntwo")
+ expect(out).to eq("baz\nqux\ntwo")
# specific group given as a string
run "Bundler.require('bar')"
- out.should eq("baz\nqux")
+ expect(out).to eq("baz\nqux")
# specific group declared as a string
run "Bundler.require(:string)"
- out.should eq("six")
+ expect(out).to eq("six")
# required in resolver order instead of gemfile order
run("Bundler.require(:not)")
- out.split("\n").sort.should == ['seven', 'three']
+ expect(out.split("\n").sort).to eq(['seven', 'three'])
end
it "allows requiring gems with non standard names explicitly" do
run "Bundler.require ; require 'mofive'"
- out.should == "two\nfive"
+ expect(out).to eq("two\nfive")
end
it "raises an exception if a require is specified but the file does not exist" do
@@ -86,7 +86,7 @@ describe "Bundler.require" do
Bundler.require
R
- err.should == "ZOMG LOAD ERROR"
+ expect(err).to eq("ZOMG LOAD ERROR")
end
describe "with namespaced gems" do
@@ -104,7 +104,7 @@ describe "Bundler.require" do
G
run "Bundler.require"
- out.should eq("jquery/rails")
+ expect(out).to eq("jquery/rails")
end
it "silently passes if the require fails" do
@@ -122,7 +122,7 @@ describe "Bundler.require" do
RUBY
ruby(cmd, :expect_err => true)
- err.should be_empty
+ expect(err).to be_empty
end
it "does not mangle explictly given requires" do
@@ -134,7 +134,7 @@ describe "Bundler.require" do
load_error_run <<-R, 'jquery-rails'
Bundler.require
R
- err.should == "ZOMG LOAD ERROR"
+ expect(err).to eq("ZOMG LOAD ERROR")
end
it "handles the case where regex fails" do
@@ -156,20 +156,20 @@ describe "Bundler.require" do
RUBY
run(cmd, :expect_err => true)
- err.should == "ZOMG LOAD ERROR"
+ expect(err).to eq("ZOMG LOAD ERROR")
end
end
describe "using bundle exec" do
it "requires the locked gems" do
bundle "exec ruby -e 'Bundler.require'"
- out.should eq("two")
+ expect(out).to eq("two")
bundle "exec ruby -e 'Bundler.require(:bar)'"
- out.should eq("baz\nqux")
+ expect(out).to eq("baz\nqux")
bundle "exec ruby -e 'Bundler.require(:default, :bar)'"
- out.should == "baz\nqux\ntwo"
+ expect(out).to eq("baz\nqux\ntwo")
end
end
@@ -206,7 +206,7 @@ describe "Bundler.require" do
G
run "Bundler.require"
- out.should eq("two\nmodule_two\none")
+ expect(out).to eq("two\nmodule_two\none")
end
describe "a gem with different requires for different envs" do
@@ -224,17 +224,17 @@ describe "Bundler.require" do
it "requires both with Bundler.require(both)" do
run "Bundler.require(:one, :two)"
- out.should == "ONE\nTWO"
+ expect(out).to eq("ONE\nTWO")
end
it "requires one with Bundler.require(:one)" do
run "Bundler.require(:one)"
- out.should == "ONE"
+ expect(out).to eq("ONE")
end
it "requires :two with Bundler.require(:two)" do
run "Bundler.require(:two)"
- out.should == "TWO"
+ expect(out).to eq("TWO")
end
end
@@ -246,7 +246,7 @@ describe "Bundler.require" do
G
run "Bundler.require"
- out.should eq("two_not_loaded\none\ntwo")
+ expect(out).to eq("two_not_loaded\none\ntwo")
end
describe "with busted gems" do
@@ -262,7 +262,7 @@ describe "Bundler.require" do
load_error_run <<-R, 'no_such_file_omg'
Bundler.require
R
- err.should == 'ZOMG LOAD ERROR'
+ expect(err).to eq('ZOMG LOAD ERROR')
end
end
end
@@ -281,7 +281,7 @@ describe "Bundler.require with platform specific dependencies" do
G
run "Bundler.require", :expect_err => true
- err.should be_empty
+ expect(err).to be_empty
end
it "requires gems pinned to multiple platforms, including the current one" do
@@ -295,7 +295,7 @@ describe "Bundler.require with platform specific dependencies" do
run "Bundler.require; puts RACK", :expect_err => true
- out.should eq("1.0.0")
- err.should be_empty
+ expect(out).to eq("1.0.0")
+ expect(err).to be_empty
end
end