Permalink
Browse files

remove the warning when testing whiny_nil

  • Loading branch information...
1 parent ae6864e commit d72c25e5c09b21b637fa117a6d9c06fb488d7b4c @dmathieu dmathieu committed with carlosantoniodasilva May 30, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 activesupport/test/whiny_nil_test.rb
@@ -3,10 +3,9 @@
class WhinyNilTest < Test::Unit::TestCase
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
end

0 comments on commit d72c25e

Please sign in to comment.