aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/date_helper_test.rb
diff options
context:
space:
mode:
authorAlexey Vakhov <vakhov@gmail.com>2012-04-22 13:38:50 +0400
committerAlexey Vakhov <vakhov@gmail.com>2012-04-24 15:58:02 +0400
commit7322bd45f034ec506a416b26bc1263dc6ee2dc5c (patch)
tree8c220e6f96d3dad7f80e598eb06bd9a8807e0ba5 /actionpack/test/template/date_helper_test.rb
parent5fdd4cd9e47be972f146a8a17a74c8f4700e2ac0 (diff)
downloadrails-7322bd45f034ec506a416b26bc1263dc6ee2dc5c.tar.gz
rails-7322bd45f034ec506a416b26bc1263dc6ee2dc5c.tar.bz2
rails-7322bd45f034ec506a416b26bc1263dc6ee2dc5c.zip
Use leap years trick in distance_of_time_in_words only for distances between real date points
Diffstat (limited to 'actionpack/test/template/date_helper_test.rb')
-rw-r--r--actionpack/test/template/date_helper_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb
index cfec2835fa..4835bc578f 100644
--- a/actionpack/test/template/date_helper_test.rb
+++ b/actionpack/test/template/date_helper_test.rb
@@ -133,6 +133,8 @@ class DateHelperTest < ActionView::TestCase
assert_equal "about 1 hour", distance_of_time_in_words(60*60)
assert_equal "1 minute", distance_of_time_in_words(0, 59)
assert_equal "about 1 hour", distance_of_time_in_words(60*60, 0)
+ assert_equal "about 3 years", distance_of_time_in_words(10**8)
+ assert_equal "about 3 years", distance_of_time_in_words(0, 10**8)
end
def test_distance_in_words_with_times