diff options
Diffstat (limited to 'spec/ruby/core/exception/dup_spec.rb')
| -rw-r--r-- | spec/ruby/core/exception/dup_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/exception/dup_spec.rb b/spec/ruby/core/exception/dup_spec.rb index edd54bfb37..b53ad79bf3 100644 --- a/spec/ruby/core/exception/dup_spec.rb +++ b/spec/ruby/core/exception/dup_spec.rb @@ -20,7 +20,7 @@ describe "Exception#dup" do it "does not copy singleton methods" do def @obj.special() :the_one end dup = @obj.dup - -> { dup.special }.should raise_error(NameError) + -> { dup.special }.should.raise(NameError) end it "does not copy modules included in the singleton class" do @@ -29,7 +29,7 @@ describe "Exception#dup" do end dup = @obj.dup - -> { dup.repr }.should raise_error(NameError) + -> { dup.repr }.should.raise(NameError) end it "does not copy constants defined in the singleton class" do @@ -38,7 +38,7 @@ describe "Exception#dup" do end dup = @obj.dup - -> { class << dup; CLONE; end }.should raise_error(NameError) + -> { class << dup; CLONE; end }.should.raise(NameError) end it "does copy the message" do @@ -61,13 +61,13 @@ describe "Exception#dup" do it "does copy the cause" do begin - raise StandardError, "the cause" + raise StandardError rescue StandardError => cause begin - raise RuntimeError, "the consequence" + raise RuntimeError rescue RuntimeError => e - e.cause.should equal(cause) - e.dup.cause.should equal(cause) + e.cause.should.equal?(cause) + e.dup.cause.should.equal?(cause) end end end |
