Class: RSpec::Signal::Reporters::Markdown
- Inherits:
-
Object
- Object
- RSpec::Signal::Reporters::Markdown
- Defined in:
- lib/rspec/signal/reporters/markdown.rb
Overview
Renders the primary artifact: a compact, model-neutral Markdown report.
Deliberately contains no instructions to the reader. It is a diagnostic document, not a prompt, so it works the same pasted into any assistant or read by a human.
Constant Summary collapse
- FENCE =
"```"- MAX_RERUN_ARGUMENTS =
10- DIAGNOSTIC_LABELS =
{ url: "URL", path: "Path", title: "Page title", status_code: "Status", driver: "Driver", console: "Console", screenshot: "Screenshot", saved_page: "Saved HTML" }.freeze
Instance Method Summary collapse
-
#initialize(report, config) ⇒ Markdown
constructor
A new instance of Markdown.
- #render ⇒ Object
Constructor Details
#initialize(report, config) ⇒ Markdown
Returns a new instance of Markdown.
20 21 22 23 |
# File 'lib/rspec/signal/reporters/markdown.rb', line 20 def initialize(report, config) @report = report @config = config end |
Instance Method Details
#render ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rspec/signal/reporters/markdown.rb', line 25 def render sections = [header] sections << outside_examples_notice # Themes before the inventory: what an agent needs first is the # possibility that thirty-five signatures are five problems. sections << sections << index if @report.group_count > 1 sections.concat(rendered_groups) sections << "#{sections.compact.join("\n\n").rstrip}\n" end |