mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't define _test_case method if already defined.
This commit is contained in:
parent
4bce8e3c75
commit
8ee27afd06
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue