Permalink
Browse files

remove the warning when testing whiny_nil

  • Loading branch information...
1 parent 3153685 commit e722fbb50f5d95fd5d5c3451f7fbf6f71b561683 @dmathieu dmathieu committed with dmathieu May 30, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 activesupport/test/whiny_nil_test.rb
@@ -33,11 +33,10 @@ def test_array
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

0 comments on commit e722fbb

Please sign in to comment.