diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-10 15:34:55 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-10 15:34:55 -0300 |
commit | 085ce4f1411238a6109fb9c22fdb2c46b27c2c0e (patch) | |
tree | e57262b3e867ee6fef40e63e09619fffde075d8e /activesupport/test/core_ext | |
parent | 54d8c81fefdb566c2f317afd0142cade0273bdbc (diff) | |
parent | 53610e5140149aca3a15a27ef103350a5969f7aa (diff) | |
download | rails-085ce4f1411238a6109fb9c22fdb2c46b27c2c0e.tar.gz rails-085ce4f1411238a6109fb9c22fdb2c46b27c2c0e.tar.bz2 rails-085ce4f1411238a6109fb9c22fdb2c46b27c2c0e.zip |
Merge branch 'master' into rm-uuid-fixtures
Conflicts:
activerecord/CHANGELOG.md
activesupport/CHANGELOG.md
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/duration_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index 28ba33331e..c8f17f4618 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -31,6 +31,13 @@ class DurationTest < ActiveSupport::TestCase assert !(1.day == 'foo') end + def test_eql + assert 1.minute.eql?(1.minute) + assert 2.days.eql?(48.hours) + assert !1.second.eql?(1) + assert !1.eql?(1.second) + end + def test_inspect assert_equal '0 seconds', 0.seconds.inspect assert_equal '1 month', 1.month.inspect |