diff options
Diffstat (limited to 'spec/ruby/core/env/fetch_spec.rb')
| -rw-r--r-- | spec/ruby/core/env/fetch_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/env/fetch_spec.rb b/spec/ruby/core/env/fetch_spec.rb index b2e7a88cab..a2ec79c62b 100644 --- a/spec/ruby/core/env/fetch_spec.rb +++ b/spec/ruby/core/env/fetch_spec.rb @@ -16,7 +16,7 @@ describe "ENV.fetch" do end it "raises a TypeError if the key is not a String" do - -> { ENV.fetch Object.new }.should raise_error(TypeError, "no implicit conversion of Object into String") + -> { ENV.fetch Object.new }.should.raise(TypeError, "no implicit conversion of Object into String") end context "when the key is not found" do @@ -25,7 +25,7 @@ describe "ENV.fetch" do it "formats the object with #inspect in the KeyError message" do -> { ENV.fetch('foo') - }.should raise_error(KeyError, 'key not found: "foo"') + }.should.raise(KeyError, 'key not found: "foo"') end end @@ -47,7 +47,7 @@ describe "ENV.fetch" do it "warns on block and default parameter given" do -> do - ENV.fetch("foo", "default") { "bar" }.should == "bar" + ENV.fetch("foo", "default") { "bar" }.should == "bar" end.should complain(/block supersedes default value argument/) end |
