Permalink
Browse files

Merge pull request #3193 from avakhov/patch-ac-test-case-safe-constan…

…tize

use safe_constantize instead constantize in AC::TestCase
  • Loading branch information...
2 parents daca35c + 0eb80fa commit 9c6d4801d1a2ef026feb2d122b7b10930d617476 @josevalim josevalim committed Oct 3, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 actionpack/lib/action_controller/test_case.rb
@@ -364,9 +364,7 @@ def controller_class
end
def determine_default_controller_class(name)
- name.sub(/Test$/, '').constantize
- rescue NameError
- nil
+ name.sub(/Test$/, '').safe_constantize
end
def prepare_controller_class(new_class)

0 comments on commit 9c6d480

Please sign in to comment.