From 29a5aeaae976bf8432d57ec996c7c81932a39de6 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Sat, 21 May 2011 23:43:12 +0200 Subject: don't raise NoMethodError the tried method doesn't exists --- activesupport/test/core_ext/object_and_class_ext_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/test/core_ext/object_and_class_ext_test.rb') diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 5d68b198f2..108010a614 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -99,7 +99,7 @@ class ObjectTryTest < Test::Unit::TestCase def test_nonexisting_method method = :undefined_method assert !@string.respond_to?(method) - assert_raise(NoMethodError) { @string.try(method) } + assert_nil @string.try(method) end def test_valid_method -- cgit v1.2.3