Class: Validator::ReportStream

Inherits:
Object
  • Object
show all
Defined in:
spec/support/formatters/report_stream.rb

Overview

Class used as a stream by the RSMP::Logger

When RSMP::Logger writes to it, the data is passed to an RSpec reporter, which will in turn distribute it to the active formatters.

Formatters can write to separate file, or to the console.

Instance Method Summary collapse

Constructor Details

#initialize(rspec_reporter) ⇒ ReportStream

Returns a new instance of ReportStream.



13
14
15
# File 'spec/support/formatters/report_stream.rb', line 13

def initialize rspec_reporter
  @reporter = rspec_reporter
end

Instance Method Details

#flushObject



21
22
# File 'spec/support/formatters/report_stream.rb', line 21

def flush
end

#puts(str) ⇒ Object



17
18
19
# File 'spec/support/formatters/report_stream.rb', line 17

def puts str
  @reporter.publish :log, message: str
end