module RSpec::TestSpec::Reporter

Public Instance Methods

example_step_failed(example, type, message, options) click to toggle source
# File lib/test_spec/rspec/reporter.rb, line 16
def example_step_failed(example, type, message, options)
  notify :example_step_failed,
    Notification.new(example, type, message, options)
end
example_step_passed(example, type, message, options) click to toggle source
# File lib/test_spec/rspec/reporter.rb, line 11
def example_step_passed(example, type, message, options)
  notify :example_step_passed,
    Notification.new(example, type, message, options)
end
example_step_pending(example, type, message, options) click to toggle source
# File lib/test_spec/rspec/reporter.rb, line 21
def example_step_pending(example, type, message, options)
  notify :example_step_pending,
    Notification.new(example, type, message, options)
end
example_step_started(example, type, message, options) click to toggle source

An RSpec reporter sends notifications to listeners. The listeners are usually formatters for a specific test run.

# File lib/test_spec/rspec/reporter.rb, line 6
def example_step_started(example, type, message, options)
  notify :example_step_started,
    Notification.new(example, type, message, options)
end
find_registered_formatter(cls) click to toggle source
# File lib/test_spec/rspec/reporter.rb, line 30
def find_registered_formatter(cls)
  registered_formatters.detect { |formatter| formatter.class == cls }
end
registered_formatters() click to toggle source
# File lib/test_spec/rspec/reporter.rb, line 26
def registered_formatters
  @listeners.values.map(&:to_a).flatten.uniq
end