Module: DTR::Agent::TestCaseExt

Includes:
MessageDecorator
Defined in:
lib/dtr/agent/test_unit.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MessageDecorator

#decorate_message

Class Method Details

.included(base) ⇒ Object



22
23
24
25
# File 'lib/dtr/agent/test_unit.rb', line 22

def self.included(base)
  base.alias_method_chain :add_failure, :decorating_source
  base.alias_method_chain :add_error, :decorating_source
end

Instance Method Details

#add_error_with_decorating_source(exception) ⇒ Object



27
28
29
# File 'lib/dtr/agent/test_unit.rb', line 27

def add_error_with_decorating_source(exception)
  add_error_without_decorating_source(DTR::RemoteError.new(exception))
end

#add_failure_with_decorating_source(message, all_locations = caller()) ⇒ Object



31
32
33
# File 'lib/dtr/agent/test_unit.rb', line 31

def add_failure_with_decorating_source(message, all_locations=caller())
  add_failure_without_decorating_source(decorate_message(message, 'Assertion failure'), all_locations)
end