Class: InspecRspecFormatter

Inherits:
RSpec::Core::Formatters::JsonFormatter
  • Object
show all
Defined in:
lib/inspec/rspec_json_formatter.rb

Instance Method Summary collapse

Instance Method Details

#add_profile(profile) ⇒ Object



34
35
36
37
# File 'lib/inspec/rspec_json_formatter.rb', line 34

def add_profile(profile)
  @profiles ||= []
  @profiles.push(profile)
end

#dump_summary(summary) ⇒ Object



39
40
41
42
43
44
45
46
# File 'lib/inspec/rspec_json_formatter.rb', line 39

def dump_summary(summary)
  super(summary)
  @output_hash[:profiles] = Array(@profiles).map do |profile|
    r = profile.params.dup
    r.delete(:rules)
    r
  end
end