module ActiveSupport::Testing::Isolation::TestUnit

Public Instance Methods

run(result) { |STARTED, name| ... } click to toggle source
Calls superclass method
# File lib/active_support/testing/isolation.rb, line 64
def run(result)
  _run_class_setup

  yield(Test::Unit::TestCase::STARTED, name)

  @_result = result

  serialized = run_in_isolation do |proxy|
    begin
      super(proxy) { }
    rescue Exception => e
      proxy.add_error(Test::Unit::Error.new(name, e))
    end
  end

  retval, proxy = Marshal.load(serialized)
  proxy.__replay__(@_result)

  yield(Test::Unit::TestCase::FINISHED, name)
  retval
end