mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
remove the warning when testing whiny_nil
This commit is contained in:
parent
31536855ae
commit
e722fbb50f
1 changed files with 1 additions and 2 deletions
|
@ -33,11 +33,10 @@ class WhinyNilTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_id
|
||||
nil.stubs(:object_id).returns(999)
|
||||
nil.id
|
||||
rescue RuntimeError => nme
|
||||
assert_no_match(/nil:NilClass/, nme.message)
|
||||
assert_match(/999/, nme.message)
|
||||
assert_match(Regexp.new(nil.object_id.to_s), nme.message)
|
||||
end
|
||||
|
||||
def test_no_to_ary_coercion
|
||||
|
|
Loading…
Reference in a new issue