diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-27 14:36:22 -0500 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-27 14:36:22 -0500 |
commit | c1ad19c92fde1c3801a93b59003ba2b266e4128f (patch) | |
tree | 76ebecf668d8302d3bcf9930466216a3d8004f76 /activesupport/test/core_ext | |
parent | abff83e60e9d91975b4788ef9cca388ab2536c10 (diff) | |
download | rails-c1ad19c92fde1c3801a93b59003ba2b266e4128f.tar.gz rails-c1ad19c92fde1c3801a93b59003ba2b266e4128f.tar.bz2 rails-c1ad19c92fde1c3801a93b59003ba2b266e4128f.zip |
Revert "Change 1.week to create 1 week durations instead of 7 days durations."
Regression: adding minutes/hours to a time would change its time zone
This reverts commit 1bf9fe75a6473cb7501cae544cab772713e68cef.
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/duration_test.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index bef660fe12..69c2c0d936 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -66,9 +66,8 @@ 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', 7.days.inspect - assert_equal '1 week', 1.week.inspect - assert_equal '2 weeks', 1.fortnight.inspect + assert_equal '7 days', 1.week.inspect + assert_equal '14 days', 1.fortnight.inspect end def test_inspect_locale |