class RSpec::Formatters::IllustratedJsonFormatter

An extension to the {RSpec::Core::Formatters::JsonFormatter} that includes the illustrations for each example.

Public Instance Methods

format_example(example) click to toggle source

@see RSpec::Core::Formatters::JsonFormatter#format_example

Calls superclass method
# File lib/rspec/formatters/illustrated_json_formatter.rb, line 16
def format_example(example)
  hash = super
  hash[:illustrations] = example.metadata[:illustrations] || []
  hash
end