From e722fbb50f5d95fd5d5c3451f7fbf6f71b561683 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 30 May 2011 16:49:56 +0200 Subject: remove the warning when testing whiny_nil --- activesupport/test/whiny_nil_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/test/whiny_nil_test.rb b/activesupport/test/whiny_nil_test.rb index ec3ca99ee6..1acaf7228f 100644 --- a/activesupport/test/whiny_nil_test.rb +++ b/activesupport/test/whiny_nil_test.rb @@ -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 -- cgit v1.2.3