summaryrefslogtreecommitdiff
path: root/spec/ruby/shared/hash/key_error.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/shared/hash/key_error.rb')
-rw-r--r--spec/ruby/shared/hash/key_error.rb28
1 files changed, 13 insertions, 15 deletions
diff --git a/spec/ruby/shared/hash/key_error.rb b/spec/ruby/shared/hash/key_error.rb
index 061c88c483..54dcb89e91 100644
--- a/spec/ruby/shared/hash/key_error.rb
+++ b/spec/ruby/shared/hash/key_error.rb
@@ -5,21 +5,19 @@ describe :key_error, shared: true do
}.should raise_error(KeyError)
end
- ruby_version_is "2.5" do
- it "sets the Hash as the receiver of KeyError" do
- -> {
- @method.call(@object, 'foo')
- }.should raise_error(KeyError) { |err|
- err.receiver.should equal(@object)
- }
- end
+ it "sets the Hash as the receiver of KeyError" do
+ -> {
+ @method.call(@object, 'foo')
+ }.should raise_error(KeyError) { |err|
+ err.receiver.should equal(@object)
+ }
+ end
- it "sets the unmatched key as the key of KeyError" do
- -> {
- @method.call(@object, 'foo')
- }.should raise_error(KeyError) { |err|
- err.key.to_s.should == 'foo'
- }
- end
+ it "sets the unmatched key as the key of KeyError" do
+ -> {
+ @method.call(@object, 'foo')
+ }.should raise_error(KeyError) { |err|
+ err.key.to_s.should == 'foo'
+ }
end
end