summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org>2015-04-09 12:10:09 -0400
committerDaniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org>2015-04-09 12:10:09 -0400
commit3d68076fe979035b8d05c77ca5635c3b5975a559 (patch)
treeffe3040ab26cf092abfbb98cdee7d9c247adf5ad
parent7813a9380ecbcadc85222a73e3b9a903b401f6f8 (diff)
parent7afeffc56fa098fe3ff215017c124ce6e7d7d6c3 (diff)
downloadhashie-3d68076fe979035b8d05c77ca5635c3b5975a559.tar.gz
Merge pull request #293 from michaelherold/mash_respond_to_suffix_ruby_2_2
Fixed specs to run with Ruby 2.2
-rw-r--r--.travis.yml1
-rw-r--r--spec/hashie/mash_spec.rb14
2 files changed, 12 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index ee28372..f5c391b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,4 +16,3 @@ matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- - rvm: 2.2.1 # https://github.com/intridea/hashie/pull/285
diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb
index ce78052..42ef67f 100644
--- a/spec/hashie/mash_spec.rb
+++ b/spec/hashie/mash_spec.rb
@@ -346,15 +346,25 @@ describe Hashie::Mash do
it 'responds to a set key with a suffix' do
%w(= ? ! _).each do |suffix|
expect(subject).to be_respond_to(:"abc#{suffix}")
- expect(subject.method(:"abc#{suffix}")).to_not be_nil
end
+
+ # for ruby 2.2 - https://github.com/intridea/hashie/pull/285
+ expect(subject.method(:"abc#{'='}")).to_not be_nil
+ expect(subject.method(:"abc#{'?'}")).to_not be_nil
+ expect(subject.method(:"abc#{'!'}")).to_not be_nil
+ expect(subject.method(:"abc#{'_'}")).to_not be_nil
end
it 'responds to an unknown key with a suffix' do
%w(= ? ! _).each do |suffix|
expect(subject).to be_respond_to(:"xyz#{suffix}")
- expect(subject.method(:"xyz#{suffix}")).to_not be_nil
end
+
+ # for ruby 2.2 - https://github.com/intridea/hashie/pull/285
+ expect(subject.method(:"xyz#{'='}")).to_not be_nil
+ expect(subject.method(:"xyz#{'?'}")).to_not be_nil
+ expect(subject.method(:"xyz#{'!'}")).to_not be_nil
+ expect(subject.method(:"xyz#{'_'}")).to_not be_nil
end
it 'does not respond to an unknown key without a suffix' do