Silence warning from requiring mathn

Running Action View test case currently printing out this warning:

    lib/mathn.rb is deprecated

This should silence the warning since we really want to require this
file in this test.
This commit is contained in:
Prem Sichanugrist 2015-04-22 11:49:35 -04:00
parent cdbf685994
commit 5efd823d9b
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ class DateHelperTest < ActionView::TestCase
def test_distance_in_words_with_mathn_required
# test we avoid Integer#/ (redefined by mathn)
require 'mathn'
silence_warnings { require "mathn" }
from = Time.utc(2004, 6, 6, 21, 45, 0)
assert_distance_of_time_in_words(from)
end