Class: RspecLogFormatter::AnalyzerFormatter

Inherits:
RSpec::Core::Formatters::BaseFormatter
  • Object
show all
Defined in:
lib/rspec_log_formatter/analyzer_formatter.rb

Defined Under Namespace

Classes: Factory

Constant Summary collapse

FILENAME =
"rspec.history"

Instance Method Summary collapse

Constructor Details

#initialize(output, options = {}) ⇒ AnalyzerFormatter

Returns a new instance of AnalyzerFormatter.


21
22
23
24
25
# File 'lib/rspec_log_formatter/analyzer_formatter.rb', line 21

def initialize(output, options={})
  super(output)
  @output = output
  @options = options
end

Instance Method Details

#dump_summary(_, _, _, _) ⇒ Object


27
28
29
30
31
# File 'lib/rspec_log_formatter/analyzer_formatter.rb', line 27

def dump_summary(_,_,_,_)
  @output.puts RspecLogFormatter::Analysis::PrettyPrinter.new(
    RspecLogFormatter::Analysis::Analyzer.new(HistoryManager.new(FILENAME), @options).analyze
  )
end