summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/clear_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/hash/clear_spec.rb')
-rw-r--r--spec/ruby/core/hash/clear_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/hash/clear_spec.rb b/spec/ruby/core/hash/clear_spec.rb
index e7816acbbc..beff925a63 100644
--- a/spec/ruby/core/hash/clear_spec.rb
+++ b/spec/ruby/core/hash/clear_spec.rb
@@ -4,7 +4,7 @@ require_relative 'fixtures/classes'
describe "Hash#clear" do
it "removes all key, value pairs" do
h = { 1 => 2, 3 => 4 }
- h.clear.should equal(h)
+ h.clear.should.equal?(h)
h.should == {}
end
@@ -25,8 +25,8 @@ describe "Hash#clear" do
h.default_proc.should_not == nil
end
- it "raises a #{frozen_error_class} if called on a frozen instance" do
- -> { HashSpecs.frozen_hash.clear }.should raise_error(frozen_error_class)
- -> { HashSpecs.empty_frozen_hash.clear }.should raise_error(frozen_error_class)
+ it "raises a FrozenError if called on a frozen instance" do
+ -> { HashSpecs.frozen_hash.clear }.should.raise(FrozenError)
+ -> { HashSpecs.empty_frozen_hash.clear }.should.raise(FrozenError)
end
end