diff options
author | Daniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org> | 2015-10-22 06:58:51 -0400 |
---|---|---|
committer | Daniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org> | 2015-10-22 06:58:51 -0400 |
commit | 5c276eb1c3d17b20a9568ac4d48925c2fe1cfb4c (patch) | |
tree | a681ce7dc5677d758bb0aabaf7c34f5b0a7f3c39 | |
parent | 21780ddeabc7432331f0fe48722153aba15ba872 (diff) | |
parent | 43d86f1c52bf4d49de6ef5514a81dadaf7ca32e1 (diff) | |
download | hashie-5c276eb1c3d17b20a9568ac4d48925c2fe1cfb4c.tar.gz |
Merge pull request #313 from pboling/issue/312-ruby-2.2.3-fixes-pended-mash-spec
Restrict pending the spec to only Ruby versions 2.2.0, 2.2.1, 2.2.2
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | hashie.gemspec | 1 | ||||
-rw-r--r-- | spec/hashie/mash_spec.rb | 5 | ||||
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/ruby_version.rb | 10 |
5 files changed, 4 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b48ce..1d1ba16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * [#304](https://github.com/intridea/hashie/pull/304): Ensured compatibility of `Hash` extensions with singleton objects - [@regexident](https://github.com/regexident). * [#306](https://github.com/intridea/hashie/pull/306): Added `Hashie::Extensions::Dash::Coercion` - [@marshall-lee](https://github.com/marshall-lee). * [#310](https://github.com/intridea/hashie/pull/310): Fixed `Hashie::Extensions::SafeAssignment` bug with private methods - [@marshall-lee](https://github.com/marshall-lee). +* [#313](https://github.com/intridea/hashie/pull/313): Restrict pending spec to only Ruby versions 2.2.0-2.2.2 - [@pboling](https://github.com/pboling). ## 3.4.2 (6/2/2015) diff --git a/hashie.gemspec b/hashie.gemspec index eaeeda4..6e49b67 100644 --- a/hashie.gemspec +++ b/hashie.gemspec @@ -18,4 +18,5 @@ Gem::Specification.new do |gem| gem.add_development_dependency 'rake' gem.add_development_dependency 'rspec', '~> 3.0' + gem.add_development_dependency 'rspec-pending_for', '~> 0.1' end diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb index c405f2a..ea3d089 100644 --- a/spec/hashie/mash_spec.rb +++ b/spec/hashie/mash_spec.rb @@ -1,6 +1,5 @@ require 'spec_helper' require 'delegate' -require 'support/ruby_version' describe Hashie::Mash do subject { Hashie::Mash.new } @@ -364,9 +363,7 @@ describe Hashie::Mash do it 'is able to access an unknown suffixed key as a method' do # See https://github.com/intridea/hashie/pull/285 for more information - if mri22? - pending 'Bug in MRI 2.2.x means this behavior is broken in those versions' - end + pending_for(engine: 'ruby', versions: %w(2.2.0 2.2.1 2.2.2)) %w(= ? ! _).each do |suffix| expect(subject.method(:"xyz#{suffix}")).to_not be_nil diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7c07c4a..e1bcd13 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,6 +7,7 @@ require 'pry' require 'rspec' require 'hashie' +require 'rspec/pending_for' RSpec.configure do |config| config.expect_with :rspec do |expect| diff --git a/spec/support/ruby_version.rb b/spec/support/ruby_version.rb deleted file mode 100644 index e8c53c5..0000000 --- a/spec/support/ruby_version.rb +++ /dev/null @@ -1,10 +0,0 @@ -def mri22? - ruby_version.start_with?('ruby_2.2') -end - -def ruby_version - interpreter = Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE - version = Object.const_defined?(:RUBY_VERSION) && RUBY_VERSION - - "#{interpreter}_#{version}" -end |