lib/test/unit/testcase.rb in test-unit-2.3.2 vs lib/test/unit/testcase.rb in test-unit-2.4.0

- old
+ new

@@ -111,11 +111,11 @@ def method_added(name) # :nodoc: super _added_methods = added_methods stringified_name = name.to_s if _added_methods.include?(stringified_name) - attribute(:redefined, true, {}, stringified_name) + attribute(:redefined, {:backtrace => caller}, {}, stringified_name) end _added_methods << stringified_name end def added_methods # :nodoc: @@ -518,11 +518,13 @@ def current_result @_result end def run_test - if self[:redefined] - notify("#{self.class}\##{@method_name} was redefined") + redefined_info = self[:redefined] + if redefined_info + notify("#{self.class}\##{@method_name} was redefined", + :backtrace => redefined_info[:backtrace]) end if @internal_data.have_test_data? __send__(@method_name, @internal_data.test_data) else __send__(@method_name)