diff options
Diffstat (limited to 'spec/ruby/core/hash/fetch_spec.rb')
| -rw-r--r-- | spec/ruby/core/hash/fetch_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/hash/fetch_spec.rb b/spec/ruby/core/hash/fetch_spec.rb index 6e0d207224..f9b80b6c49 100644 --- a/spec/ruby/core/hash/fetch_spec.rb +++ b/spec/ruby/core/hash/fetch_spec.rb @@ -12,7 +12,7 @@ describe "Hash#fetch" do it "formats the object with #inspect in the KeyError message" do -> { {}.fetch('foo') - }.should raise_error(KeyError, 'key not found: "foo"') + }.should.raise(KeyError, 'key not found: "foo"') end end @@ -38,7 +38,7 @@ describe "Hash#fetch" do end it "raises an ArgumentError when not passed one or two arguments" do - -> { {}.fetch() }.should raise_error(ArgumentError) - -> { {}.fetch(1, 2, 3) }.should raise_error(ArgumentError) + -> { {}.fetch() }.should.raise(ArgumentError) + -> { {}.fetch(1, 2, 3) }.should.raise(ArgumentError) end end |
