aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authordmathieu <42@dmathieu.com>2011-05-21 23:43:12 +0200
committerdmathieu <42@dmathieu.com>2011-05-21 23:43:12 +0200
commit29a5aeaae976bf8432d57ec996c7c81932a39de6 (patch)
tree9ff3bdf6020c5c9a65791fb6f60c613c170e3567 /activesupport/test/core_ext
parentf674aed150e4c87cd9f149307313114a597dfa8b (diff)
downloadrails-29a5aeaae976bf8432d57ec996c7c81932a39de6.tar.gz
rails-29a5aeaae976bf8432d57ec996c7c81932a39de6.tar.bz2
rails-29a5aeaae976bf8432d57ec996c7c81932a39de6.zip
don't raise NoMethodError the tried method doesn't exists
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb2
1 files changed, 1 insertions, 1 deletions
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