Class: Attest::Output::TestUnitOutputWriter

Inherits:
OutputWriter show all
Defined in:
lib/attest/output/test_unit_output_writer.rb

Instance Method Summary collapse

Methods inherited from OutputWriter

#after_container, #an_error, #before_test, #ignore_container, #initialize, #summary

Methods included from OutputWriterInterface

#after_container, #an_error, #before_test, #ignore_container, #summary

Constructor Details

This class inherits a constructor from Attest::Output::OutputWriter

Instance Method Details

#after_all_testsObject



12
13
14
15
# File 'lib/attest/output/test_unit_output_writer.rb', line 12

def after_all_tests
  super
  puts 
end

#after_test(test_object) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/attest/output/test_unit_output_writer.rb', line 22

def after_test(test_object)
  relevant_result = determine_relevant_result test_object
  if relevant_result
    print "#{relevant_result.status.upcase[0]}"
  else
    print '.'
  end
end

#before_all_testsObject



7
8
9
10
# File 'lib/attest/output/test_unit_output_writer.rb', line 7

def before_all_tests
  super
  puts 
end

#before_container(container) ⇒ Object



17
18
19
20
# File 'lib/attest/output/test_unit_output_writer.rb', line 17

def before_container(container)
  previous_container = @containers.last
  @containers << container
end