diff options
author | Xavier Noria <fxn@hashref.com> | 2013-03-28 10:04:39 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-03-28 10:04:39 +0100 |
commit | 341e61154715c7e0f9f4eee7dd90580202735db7 (patch) | |
tree | ef56a826149c4f9803278a498c170ddf439e232b /activesupport/lib | |
parent | 0417bc83164422119ab2dc4da92ec6ddff5a3d2f (diff) | |
download | rails-341e61154715c7e0f9f4eee7dd90580202735db7.tar.gz rails-341e61154715c7e0f9f4eee7dd90580202735db7.tar.bz2 rails-341e61154715c7e0f9f4eee7dd90580202735db7.zip |
determine_constant_from_test_name does not swallow NoMethodErrors [Yves Senn]
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/testing/constant_lookup.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/constant_lookup.rb b/activesupport/lib/active_support/testing/constant_lookup.rb index 52bfeb7179..1b2a75c35d 100644 --- a/activesupport/lib/active_support/testing/constant_lookup.rb +++ b/activesupport/lib/active_support/testing/constant_lookup.rb @@ -38,6 +38,8 @@ module ActiveSupport begin constant = names.join("::").constantize break(constant) if yield(constant) + rescue NoMethodError # subclass of NameError + raise rescue NameError # Constant wasn't found, move on ensure |