diff options
author | Elliot Winkler <elliot.winkler@gmail.com> | 2012-02-25 16:55:30 -0700 |
---|---|---|
committer | Elliot Winkler <elliot.winkler@gmail.com> | 2012-04-30 11:19:49 -0600 |
commit | d2f995eda9df2cc714fe1552604903008ed0baaf (patch) | |
tree | 28c4a36b49459cd687009d1fd3f12dd2b940c230 /actionpack/test | |
parent | c435feb4044f6c62bb188c459c3be5d81cc77b07 (diff) | |
download | rails-d2f995eda9df2cc714fe1552604903008ed0baaf.tar.gz rails-d2f995eda9df2cc714fe1552604903008ed0baaf.tar.bz2 rails-d2f995eda9df2cc714fe1552604903008ed0baaf.zip |
distance_of_time_in_words: 45-60 days is about 2 months, not about 1 month
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/date_helper_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index 928c767084..1b8d338b63 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -77,7 +77,9 @@ class DateHelperTest < ActionView::TestCase # 43200..86399 assert_equal "about 1 month", distance_of_time_in_words(from, to + 29.days + 23.hours + 59.minutes + 30.seconds) - assert_equal "about 1 month", distance_of_time_in_words(from, to + 59.days + 23.hours + 59.minutes + 29.seconds) + assert_equal "about 1 month", distance_of_time_in_words(from, to + 44.days + 23.hours + 59.minutes + 29.seconds) + assert_equal "about 2 months", distance_of_time_in_words(from, to + 44.days + 23.hours + 59.minutes + 30.seconds) + assert_equal "about 2 months", distance_of_time_in_words(from, to + 59.days + 23.hours + 59.minutes + 29.seconds) # 86400..525599 assert_equal "2 months", distance_of_time_in_words(from, to + 59.days + 23.hours + 59.minutes + 30.seconds) |