Class: ActiveSupport::Testing::ProxyTestResult
- Inherits:
-
Object
- Object
- ActiveSupport::Testing::ProxyTestResult
show all
- Defined in:
- lib/active_support/testing/isolation.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ProxyTestResult.
15
16
17
|
# File 'lib/active_support/testing/isolation.rb', line 15
def initialize
@calls = []
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
30
31
32
|
# File 'lib/active_support/testing/isolation.rb', line 30
def method_missing(name, *args)
@calls << [name, args]
end
|
Instance Method Details
#__replay__(result) ⇒ Object
24
25
26
27
28
|
# File 'lib/active_support/testing/isolation.rb', line 24
def __replay__(result)
@calls.each do |name, args|
result.send(name, *args)
end
end
|
#add_error(e) ⇒ Object
19
20
21
22
|
# File 'lib/active_support/testing/isolation.rb', line 19
def add_error(e)
e = Test::Unit::Error.new(e.test_name, RemoteError.new(e.exception))
@calls << [:add_error, e]
end
|