aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/duration_test.rb
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2014-08-23 13:14:22 +0200
committerRobin Dupret <robin.dupret@gmail.com>2014-08-24 18:17:46 +0200
commit61a371cf0f6cefda9b0f9a5dd51ada70714a7816 (patch)
treebfbdbc89163148207097103de7ae12aba4abbc11 /activesupport/test/core_ext/duration_test.rb
parentd5578cd17716fbda11ec37ce7489699d191878a3 (diff)
downloadrails-61a371cf0f6cefda9b0f9a5dd51ada70714a7816.tar.gz
rails-61a371cf0f6cefda9b0f9a5dd51ada70714a7816.tar.bz2
rails-61a371cf0f6cefda9b0f9a5dd51ada70714a7816.zip
Skip #eql? tests on Rubinius for AS::Duration
Since Rubinius is relying on #instance_of? for its definition of #eql? (http://git.io/MtmbbA) but ActiveSupport::Duration should behave like is_a? it returns true with `Fixnum`. Thus, for the moment, the last assertion is failing so we have to skip this test.
Diffstat (limited to 'activesupport/test/core_ext/duration_test.rb')
-rw-r--r--activesupport/test/core_ext/duration_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb
index 8d7be4857b..a89202f518 100644
--- a/activesupport/test/core_ext/duration_test.rb
+++ b/activesupport/test/core_ext/duration_test.rb
@@ -41,6 +41,9 @@ class DurationTest < ActiveSupport::TestCase
end
def test_eql
+ rubinius_skip "Rubinius' #eql? definition relies on #instance_of? " \
+ "which behaves oddly for the sake of backward-compatibility."
+
assert 1.minute.eql?(1.minute)
assert 2.days.eql?(48.hours)
assert !1.second.eql?(1)