From 5efd823d9b2da3fff0baf095a92c76e5bb99a074 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Wed, 22 Apr 2015 11:49:35 -0400 Subject: 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. --- actionview/test/template/date_helper_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/test') diff --git a/actionview/test/template/date_helper_test.rb b/actionview/test/template/date_helper_test.rb index bfb073680e..a0e1f5f3bb 100644 --- a/actionview/test/template/date_helper_test.rb +++ b/actionview/test/template/date_helper_test.rb @@ -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 -- cgit v1.2.3