Skip to content

Commit e722fbb

Browse files
committed
remove the warning when testing whiny_nil
1 parent 3153685 commit e722fbb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

activesupport/test/whiny_nil_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ def test_array
3333
end
3434

3535
def test_id
36-
nil.stubs(:object_id).returns(999)
3736
nil.id
3837
rescue RuntimeError => nme
3938
assert_no_match(/nil:NilClass/, nme.message)
40-
assert_match(/999/, nme.message)
39+
assert_match(Regexp.new(nil.object_id.to_s), nme.message)
4140
end
4241

4342
def test_no_to_ary_coercion

0 commit comments

Comments
 (0)