Skip to content

Commit ca8484f

Browse files
committed
Remove outdated mathn related test
Ref: rails#8222 `mathn` used to be in the standard library, hence this was a relatively common issue. But it has been extracted and deprecated a long time ago, so It's no longer a big concern. Making `Integer#/` private now emits a warning on Ruby 3.4: ``` /rails/actionview/test/template/date_helper_test.rb:148: warning: Redefining 'Integer#/' disables interpreter and JIT optimizations ```
1 parent e90cb82 commit ca8484f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

actionview/test/template/date_helper_test.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,6 @@ def test_distance_in_words_with_mixed_argument_types
143143
assert_equal "10 minutes", distance_of_time_in_words(Time.at(600), 0)
144144
end
145145

146-
def test_distance_in_words_doesnt_use_the_quotient_operator
147-
# Make sure that we avoid Integer#/ (redefined by mathn gem to return Rational)
148-
Integer.send :private, :/
149-
150-
from = Time.utc(2004, 6, 6, 21, 45, 0)
151-
assert_distance_of_time_in_words(from)
152-
ensure
153-
Integer.send :public, :/
154-
end
155-
156146
def test_time_ago_in_words_passes_include_seconds
157147
assert_equal "less than 20 seconds", time_ago_in_words(15.seconds.ago, include_seconds: true)
158148
assert_equal "less than a minute", time_ago_in_words(15.seconds.ago, include_seconds: false)

0 commit comments

Comments
 (0)