diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-22 11:07:26 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-22 11:07:26 -0300 |
commit | 9b61a7eda929fcc2e2b0cd34e27d0fceafa7c389 (patch) | |
tree | d6539bce22e7e282d60603ef9f4c33efc2a8f3cc /activesupport/test | |
parent | f020f302ad8e3be9ccd06099e59337afa1bb5000 (diff) | |
parent | eb73d7dafa343507a60f765c43c748d6987ec652 (diff) | |
download | rails-9b61a7eda929fcc2e2b0cd34e27d0fceafa7c389.tar.gz rails-9b61a7eda929fcc2e2b0cd34e27d0fceafa7c389.tar.bz2 rails-9b61a7eda929fcc2e2b0cd34e27d0fceafa7c389.zip |
Merge pull request #16560 from robin850/rbx-duration-eql
Define the Duration#instance_of? method
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/duration_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index 31af3c4521..330d995b7c 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -41,6 +41,11 @@ class DurationTest < ActiveSupport::TestCase assert !1.eql?(1.second) end + def test_instance_of + assert !1.minute.instance_of?(Fixnum) + assert !2.days.instance_of?(Fixnum) + end + def test_inspect assert_equal '0 seconds', 0.seconds.inspect assert_equal '1 month', 1.month.inspect |