diff options
author | Andrey Novikov <envek@envek.name> | 2015-12-27 19:32:31 +0300 |
---|---|---|
committer | Andrey Novikov <envek@envek.name> | 2016-04-18 08:33:40 +0300 |
commit | 1bf9fe75a6473cb7501cae544cab772713e68cef (patch) | |
tree | e611adb4504847c2a1884c1dc86691f6392df4b3 /activesupport/test | |
parent | 781271b3b0337241acde6c90bb54ad4cfae389a1 (diff) | |
download | rails-1bf9fe75a6473cb7501cae544cab772713e68cef.tar.gz rails-1bf9fe75a6473cb7501cae544cab772713e68cef.tar.bz2 rails-1bf9fe75a6473cb7501cae544cab772713e68cef.zip |
Change 1.week to create 1 week durations instead of 7 days durations.
This is just to remove astonishment from getting `3600 seconds` from typing `1.hour`.
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/duration_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index 9e97acaffb..a6a43048db 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -66,8 +66,9 @@ class DurationTest < ActiveSupport::TestCase assert_equal '10 years, 2 months, and 1 day', (10.years + 2.months + 1.day).inspect assert_equal '10 years, 2 months, and 1 day', (10.years + 1.month + 1.day + 1.month).inspect assert_equal '10 years, 2 months, and 1 day', (1.day + 10.years + 2.months).inspect - assert_equal '7 days', 1.week.inspect - assert_equal '14 days', 1.fortnight.inspect + assert_equal '7 days', 7.days.inspect + assert_equal '1 week', 1.week.inspect + assert_equal '2 weeks', 1.fortnight.inspect end def test_inspect_locale |