Class: RSpec::Signal::Reporters::FullOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/signal/reporters/full_output.rb

Overview

The unreduced failure output, preserved verbatim.

This exists so reduction is never lossy in practice: if the compact report dropped the one frame that mattered, the original is one file away. It is not the artifact you hand to an agent.

Instance Method Summary collapse

Constructor Details

#initialize(report, config) ⇒ FullOutput

Returns a new instance of FullOutput.



12
13
14
15
# File 'lib/rspec/signal/reporters/full_output.rb', line 12

def initialize(report, config)
  @report = report
  @config = config
end

Instance Method Details

#renderObject



17
18
19
20
21
22
23
24
# File 'lib/rspec/signal/reporters/full_output.rb', line 17

def render
  out = ["rspec-signal #{VERSION} -- unreduced failure output", ""]
  @report.failures.each_with_index do |failure, index|
    out << (failure.raw || fallback(failure, index + 1))
    out << ""
  end
  "#{out.join("\n").rstrip}\n"
end