1
# This is an example of how you can use a custom formatter to do custom
2
# reporting. This formatter will only report example groups and examples that
3
# have :report => true (or anything truthy) in the declaration. See
4
# options_example.rb in this directory.
6
require 'spec/runner/formatter/base_text_formatter'
8
class OptionsFormatter < Spec::Runner::Formatter::BaseTextFormatter
9
def example_started(proxy)
10
if proxy.options[:report]
11
puts proxy.description
15
def example_group_started(proxy)
16
if proxy.options[:report]
17
puts proxy.description