summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/shared
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/hash/shared')
-rw-r--r--spec/ruby/core/hash/shared/replace.rb8
-rw-r--r--spec/ruby/core/hash/shared/select.rb8
-rw-r--r--spec/ruby/core/hash/shared/store.rb4
-rw-r--r--spec/ruby/core/hash/shared/update.rb10
4 files changed, 15 insertions, 15 deletions
diff --git a/spec/ruby/core/hash/shared/replace.rb b/spec/ruby/core/hash/shared/replace.rb
index b3d098763b..bea64384bb 100644
--- a/spec/ruby/core/hash/shared/replace.rb
+++ b/spec/ruby/core/hash/shared/replace.rb
@@ -37,15 +37,15 @@ describe :hash_replace, shared: true do
hash_a.default.should == hash_b.default
end
- it "raises a #{frozen_error_class} if called on a frozen instance that would not be modified" do
+ it "raises a FrozenError if called on a frozen instance that would not be modified" do
-> do
HashSpecs.frozen_hash.send(@method, HashSpecs.frozen_hash)
- end.should raise_error(frozen_error_class)
+ end.should raise_error(FrozenError)
end
- it "raises a #{frozen_error_class} if called on a frozen instance that is modified" do
+ it "raises a FrozenError if called on a frozen instance that is modified" do
-> do
HashSpecs.frozen_hash.send(@method, HashSpecs.empty_frozen_hash)
- end.should raise_error(frozen_error_class)
+ end.should raise_error(FrozenError)
end
end
diff --git a/spec/ruby/core/hash/shared/select.rb b/spec/ruby/core/hash/shared/select.rb
index bb781817cb..5170af50d6 100644
--- a/spec/ruby/core/hash/shared/select.rb
+++ b/spec/ruby/core/hash/shared/select.rb
@@ -74,12 +74,12 @@ describe :hash_select!, shared: true do
{ a: 1 }.send(@method) { |k,v| v <= 1 }.should == nil
end
- it "raises a #{frozen_error_class} if called on an empty frozen instance" do
- -> { HashSpecs.empty_frozen_hash.send(@method) { false } }.should raise_error(frozen_error_class)
+ it "raises a FrozenError if called on an empty frozen instance" do
+ -> { HashSpecs.empty_frozen_hash.send(@method) { false } }.should raise_error(FrozenError)
end
- it "raises a #{frozen_error_class} if called on a frozen instance that would not be modified" do
- -> { HashSpecs.frozen_hash.send(@method) { true } }.should raise_error(frozen_error_class)
+ it "raises a FrozenError if called on a frozen instance that would not be modified" do
+ -> { HashSpecs.frozen_hash.send(@method) { true } }.should raise_error(FrozenError)
end
it_should_behave_like :hash_iteration_no_block
diff --git a/spec/ruby/core/hash/shared/store.rb b/spec/ruby/core/hash/shared/store.rb
index ff40bef3ef..6e2557eb28 100644
--- a/spec/ruby/core/hash/shared/store.rb
+++ b/spec/ruby/core/hash/shared/store.rb
@@ -86,8 +86,8 @@ describe :hash_store, shared: true do
h.keys.last.should_not equal(key2)
end
- it "raises a #{frozen_error_class} if called on a frozen instance" do
- -> { HashSpecs.frozen_hash.send(@method, 1, 2) }.should raise_error(frozen_error_class)
+ it "raises a FrozenError if called on a frozen instance" do
+ -> { HashSpecs.frozen_hash.send(@method, 1, 2) }.should raise_error(FrozenError)
end
it "does not raise an exception if changing the value of an existing key during iteration" do
diff --git a/spec/ruby/core/hash/shared/update.rb b/spec/ruby/core/hash/shared/update.rb
index 3af41c450a..4bb20e5b85 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 #{frozen_error_class} on a frozen instance that is modified" do
+ it "raises a FrozenError on a frozen instance that is modified" do
-> do
HashSpecs.frozen_hash.send(@method, 1 => 2)
- end.should raise_error(frozen_error_class)
+ end.should raise_error(FrozenError)
end
it "checks frozen status before coercing an object with #to_hash" do
@@ -47,14 +47,14 @@ describe :hash_update, shared: true do
def obj.to_hash() raise Exception, "should not receive #to_hash" end
obj.freeze
- -> { HashSpecs.frozen_hash.send(@method, obj) }.should raise_error(frozen_error_class)
+ -> { HashSpecs.frozen_hash.send(@method, obj) }.should raise_error(FrozenError)
end
# see redmine #1571
- it "raises a #{frozen_error_class} on a frozen instance that would not be modified" do
+ it "raises a FrozenError on a frozen instance that would not be modified" do
-> do
HashSpecs.frozen_hash.send(@method, HashSpecs.empty_frozen_hash)
- end.should raise_error(frozen_error_class)
+ end.should raise_error(FrozenError)
end
it "does not raise an exception if changing the value of an existing key during iteration" do