run_with_callbacks_and_testunit(result)
public
This redefinition is unfortunate but test/unit shows us no alternative.
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 52
def run_with_callbacks_and_testunit(result) #:nodoc:
return if @method_name.to_s == "default_test"
yield(Test::Unit::TestCase::STARTED, name)
@_result = result
begin
run_callbacks :setup
setup
__send__(@method_name)
rescue Test::Unit::AssertionFailedError => e
add_failure(e.message, e.backtrace)
rescue *PASSTHROUGH_EXCEPTIONS
raise
rescue Exception
add_error($!)
ensure
begin
teardown
run_callbacks :teardown, :enumerator => :reverse_each
rescue Test::Unit::AssertionFailedError => e
add_failure(e.message, e.backtrace)
rescue *PASSTHROUGH_EXCEPTIONS
raise
rescue Exception
add_error($!)
end
end
result.add_run
yield(Test::Unit::TestCase::FINISHED, name)
end