提交 934bb012 编写于 作者: Y Yehuda Katz

Fixes remote errors in isolation tests

上级 f8d06e62
module ActiveSupport
module Testing
class RemoteError < StandardError
attr_reader :message, :backtrace
def initialize(exception)
@message = "caught #{exception.class.name}: #{exception.message}"
@backtrace = exception.backtrace
end
end
class ProxyTestResult
def initialize
@calls = []
end
def add_error(e)
e = Test::Unit::Error.new(e.test_name, RemoteError.new(e.exception))
@calls << [:add_error, e]
end
def __replay__(result)
@calls.each do |name, args|
result.send(name, *args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册