diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 15:21:44 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 15:21:44 -0300 |
commit | 8ee27afd064bccfc63b21f126109a9b20ce72bd5 (patch) | |
tree | 339e78fd59cefcc2942d0db9564e38811e7511d1 /actionpack | |
parent | 4bce8e3c7510cd1bc1821af208d05e8c87349fb2 (diff) | |
download | rails-8ee27afd064bccfc63b21f126109a9b20ce72bd5.tar.gz rails-8ee27afd064bccfc63b21f126109a9b20ce72bd5.tar.bz2 rails-8ee27afd064bccfc63b21f126109a9b20ce72bd5.zip |
Don't define _test_case method if already defined.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/test_case.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 32fd8c5e21..de23a67cb6 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -137,8 +137,10 @@ module ActionView def make_test_case_available_to_view! test_case_instance = self _helpers.module_eval do - define_method(:_test_case) { test_case_instance } - private :_test_case + unless private_method_defined?(:_test_case) + define_method(:_test_case) { test_case_instance } + private :_test_case + end end end |