Permalink
Browse files

remove the warning when testing whiny_nil

  • Loading branch information...
1 parent dd3caf6 commit 18bce295c2b4b84141614180edf46a09ebeabf39 @dmathieu dmathieu committed with carlosantoniodasilva May 30, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 activesupport/test/whiny_nil_test.rb
View
3 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 18bce29

Please sign in to comment.