Class: RSpec::Signal::Reporters::JsonReport
- Inherits:
-
Object
- Object
- RSpec::Signal::Reporters::JsonReport
- Defined in:
- lib/rspec/signal/reporters/json_report.rb
Overview
Machine-readable twin of the Markdown report, for tooling and CI.
Instance Method Summary collapse
-
#initialize(report, _config = nil) ⇒ JsonReport
constructor
A new instance of JsonReport.
- #render ⇒ Object
Constructor Details
#initialize(report, _config = nil) ⇒ JsonReport
Returns a new instance of JsonReport.
10 11 12 |
# File 'lib/rspec/signal/reporters/json_report.rb', line 10 def initialize(report, _config = nil) @report = report end |
Instance Method Details
#render ⇒ Object
14 15 16 |
# File 'lib/rspec/signal/reporters/json_report.rb', line 14 def render "#{JSON.pretty_generate(@report.to_h)}\n" end |