remove the warning when testing whiny_nil
This commit is contained in:
parent
31536855ae
commit
e722fbb50f
|
@ -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 New Issue