summaryrefslogtreecommitdiff
path: root/spec/hashie/extensions/coercion_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/hashie/extensions/coercion_spec.rb')
-rw-r--r--spec/hashie/extensions/coercion_spec.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/spec/hashie/extensions/coercion_spec.rb b/spec/hashie/extensions/coercion_spec.rb
index 72265e1..9931ed4 100644
--- a/spec/hashie/extensions/coercion_spec.rb
+++ b/spec/hashie/extensions/coercion_spec.rb
@@ -563,13 +563,7 @@ describe Hashie::Extensions::Coercion do
end
it 'raises a CoercionError when coercion is not possible' do
- type =
- if Hashie::Extensions::RubyVersion.new(RUBY_VERSION) >=
- Hashie::Extensions::RubyVersion.new('2.4.0')
- Integer
- else
- Fixnum
- end
+ type = Integer
subject.coerce_value type, Symbol
expect { instance[:hi] = 1 }.to raise_error(
@@ -578,13 +572,7 @@ describe Hashie::Extensions::Coercion do
end
it 'coerces Integer to String' do
- type =
- if Hashie::Extensions::RubyVersion.new(RUBY_VERSION) >=
- Hashie::Extensions::RubyVersion.new('2.4.0')
- Integer
- else
- Fixnum
- end
+ type = Integer
subject.coerce_value type, String