diff options
author | Peter Goldstein <peter.m.goldstein@gmail.com> | 2022-01-27 18:59:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 18:59:24 -0800 |
commit | 3e57eb531f2d028cb56cd1ddab9bb07c70b93abf (patch) | |
tree | ca47e5a94dde4b16d7fcd841a9becfb6cb6d9245 /spec/hashie/extensions | |
parent | 4dc015eb522abfaa2323c36024bc214ab8ccb9cc (diff) | |
download | hashie-3e57eb531f2d028cb56cd1ddab9bb07c70b93abf.tar.gz |
Add Ruby 3.1 to CI (#558)
* Add Ruby 3.1 to CI
Update Rubocop for recent Rubies
Disable Rubocop run for Rubies before Ruby 2.4
Quote '3.0' in the CI configuration to ensure it loads a 3.0.x Ruby
Set RUBYOPT="--disable_error_highlight" so Ruby 3.1 error matchers pass
* Add CHANGELOG.md entry
* Re-add deleted line from CHANGELOG.md
* Set minimum supported Ruby version to 2.4.
Remove a number of code bits designed to support Rubies below version 2.4
* Bump version. Remove unneeded require from Gemfile. Add require to spec/support file
Diffstat (limited to 'spec/hashie/extensions')
-rw-r--r-- | spec/hashie/extensions/coercion_spec.rb | 16 |
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 |