summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sievers <michael_sievers@web.de>2015-02-03 12:55:22 +0100
committerMichael Herold <michael.j.herold@gmail.com>2015-04-09 08:39:37 -0500
commita2c3f591dd381aa56f6191bacec9d2929ebac0b8 (patch)
treeda99c23956bfcdb3d1c8542af00b1684d35ff6f0
parent7813a9380ecbcadc85222a73e3b9a903b401f6f8 (diff)
downloadhashie-a2c3f591dd381aa56f6191bacec9d2929ebac0b8.tar.gz
(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..d6813cf 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
+
+ # it seems for ruby 2.2 :"abc#{suffix}" !== :"abc#{'='}" internally
+ 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
+
+ # it seems for ruby 2.2 :"abc#{suffix}" !== :"abc#{'='}" internally
+ 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