1
0
Fork 0
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:
dmathieu 2011-05-30 16:49:56 +02:00 committed by Damien Mathieu
parent 31536855ae
commit e722fbb50f

View file

@ -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