Method: Aspec::Formatter::JUnit#initialize
- Defined in:
- lib/aspec/formatters/junit.rb
#initialize(test_file_name, verbose = false, out_file_name = '.junit_aspecs') ⇒ JUnit
Returns a new instance of JUnit.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/aspec/formatters/junit.rb', line 5 def initialize(test_file_name, verbose = false, out_file_name = '.junit_aspecs') @test_results = { :failures => [], :successes => [] } @out = File.open(out_file_name, 'w') @test_file_name = test_file_name @exceptions = [] at_exit do unless @out.closed? @out.flush @out.close puts "Output junit results to .junit_aspecs" end end end |