summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/shared/update.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/hash/shared/update.rb')
-rw-r--r--spec/ruby/core/hash/shared/update.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/hash/shared/update.rb b/spec/ruby/core/hash/shared/update.rb
index b1e3793028..be03ac019e 100644
--- a/spec/ruby/core/hash/shared/update.rb
+++ b/spec/ruby/core/hash/shared/update.rb
@@ -34,10 +34,10 @@ describe :hash_update, shared: true do
merge_bang_pairs.should == merge_pairs
end
- it "raises a RuntimeError on a frozen instance that is modified" do
+ it "raises a #{frozen_error_class} on a frozen instance that is modified" do
lambda do
HashSpecs.frozen_hash.send(@method, 1 => 2)
- end.should raise_error(RuntimeError)
+ end.should raise_error(frozen_error_class)
end
it "checks frozen status before coercing an object with #to_hash" do
@@ -47,13 +47,13 @@ describe :hash_update, shared: true do
def obj.to_hash() raise Exception, "should not receive #to_hash" end
obj.freeze
- lambda { HashSpecs.frozen_hash.send(@method, obj) }.should raise_error(RuntimeError)
+ lambda { HashSpecs.frozen_hash.send(@method, obj) }.should raise_error(frozen_error_class)
end
# see redmine #1571
- it "raises a RuntimeError on a frozen instance that would not be modified" do
+ it "raises a #{frozen_error_class} on a frozen instance that would not be modified" do
lambda do
HashSpecs.frozen_hash.send(@method, HashSpecs.empty_frozen_hash)
- end.should raise_error(RuntimeError)
+ end.should raise_error(frozen_error_class)
end
end