Class: Testprune::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/testprune/report.rb

Overview

Renders the analysis as a grouped, human-readable report (or JSON). Candidates are grouped by confidence; HIGH shows safety status, MEDIUM/LOW are marked review-only.

Constant Summary collapse

GROUP_TITLES =
{
  identical:  'Identical coverage',
  subset:     'Subset / subsumed coverage',
  structural: 'Structurally duplicated test body',
  overlap:    'High coverage overlap'
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(result, json: false) ⇒ Report

Returns a new instance of Report.



17
18
19
20
# File 'lib/testprune/report.rb', line 17

def initialize(result, json: false)
  @result = result
  @json   = json
end

Instance Method Details

#renderObject



22
23
24
# File 'lib/testprune/report.rb', line 22

def render
  @json ? render_json : render_text
end