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
1 changed files with 1 additions and 2 deletions

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