aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authordmathieu <42@dmathieu.com>2011-05-30 16:49:56 +0200
committerDamien Mathieu <42@dmathieu.com>2011-07-07 11:21:23 +0200
commite722fbb50f5d95fd5d5c3451f7fbf6f71b561683 (patch)
tree2d240de3899c0fe1958b0f063fa667d01e4669c4 /activesupport
parent31536855ae90bf2fb07c855d05837246b5aa6fb9 (diff)
downloadrails-e722fbb50f5d95fd5d5c3451f7fbf6f71b561683.tar.gz
rails-e722fbb50f5d95fd5d5c3451f7fbf6f71b561683.tar.bz2
rails-e722fbb50f5d95fd5d5c3451f7fbf6f71b561683.zip
remove the warning when testing whiny_nil
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/whiny_nil_test.rb3
1 files changed, 1 insertions, 2 deletions
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