Skip to content

Commit 4d209b5

Browse files
committed
Merge pull request rails#15610 from sgrif/silence-warnings
Fix warnings in tests
2 parents 4bd2a50 + 8a072fc commit 4d209b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

activerecord/test/cases/adapters/postgresql/range_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def test_custom_range_values
156156
assert_equal 0.5..0.7, @first_range.float_range
157157
assert_equal 0.5...0.7, @second_range.float_range
158158
assert_equal 0.5...Float::INFINITY, @third_range.float_range
159-
assert_equal (-Float::INFINITY...Float::INFINITY), @fourth_range.float_range
159+
assert_equal(-Float::INFINITY...Float::INFINITY, @fourth_range.float_range)
160160
assert_nil @empty_range.float_range
161161
end
162162

activerecord/test/cases/finder_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def test_find
3434
end
3535

3636
def test_find_with_proc_parameter_and_block
37-
e = assert_raises(RuntimeError) do
37+
exception = assert_raises(RuntimeError) do
3838
Topic.all.find(-> { raise "should happen" }) { |e| e.title == "non-existing-title" }
3939
end
40-
assert_equal "should happen", e.message
40+
assert_equal "should happen", exception.message
4141

4242
assert_nothing_raised(RuntimeError) do
4343
Topic.all.find(-> { raise "should not happen" }) { |e| e.title == topics(:first).title }

0 commit comments

Comments
 (0)