class Inspec::Formatters::RspecJson
def format_example(example)
rspec's example id here corresponds to an inspec test's control name -
See https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/formatters/json_formatter.rb
and dump_profile (both of which call format_example).
This is to avoid having to repeat this id functionality in both dump_summary
We are cheating and overriding a private method in RSpec's core JsonFormatter.
def format_example(example) res = super(example) res[:id] = example.metadata[:id] res end