From 5a6d9d54917e1311a9aef78a82313c296d821150 Mon Sep 17 00:00:00 2001 From: Ben Tucker Date: Wed, 1 May 2013 18:09:04 -0400 Subject: Merging in fix from #8222 --- actionpack/test/template/date_helper_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test/template/date_helper_test.rb') diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index e4f84f8dd7..50c7892ad0 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -19,6 +19,8 @@ class DateHelperTest < ActionView::TestCase end def assert_distance_of_time_in_words(from, to=nil) + Fixnum.send :private, :/ # test we avoid Integer#/ (redefined by mathn) + to ||= from # 0..1 with include_seconds @@ -96,6 +98,9 @@ class DateHelperTest < ActionView::TestCase # test to < from assert_equal "about 4 hours", distance_of_time_in_words(from + 4.hours, to) assert_equal "less than 20 seconds", distance_of_time_in_words(from + 19.seconds, to, true) + + ensure + Fixnum.send :public, :/ end def test_distance_in_words -- cgit v1.2.3