Class: Minitest::Queue::OrderReporter

Inherits:
Reporters::BaseReporter
  • Object
show all
Defined in:
lib/minitest/queue/order_reporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ OrderReporter

Returns a new instance of OrderReporter.



5
6
7
8
# File 'lib/minitest/queue/order_reporter.rb', line 5

def initialize(options = {})
  @path = options.delete(:path)
  super
end

Instance Method Details

#before_test(test) ⇒ Object



15
16
17
18
19
# File 'lib/minitest/queue/order_reporter.rb', line 15

def before_test(test)
  super
  @file.puts("#{test.class.name}##{test.name}")
  @file.flush
end

#reportObject



21
22
23
# File 'lib/minitest/queue/order_reporter.rb', line 21

def report
  @file.close
end

#startObject



10
11
12
13
# File 'lib/minitest/queue/order_reporter.rb', line 10

def start
  @file = File.open(@path, 'w+')
  super
end