Module: RSpec::Specify::Reporter

Defined in:
lib/specify/rspec/reporter.rb

Instance Method Summary collapse

Instance Method Details

#example_step_failed(example, type, message, options) ⇒ Object



16
17
18
# File 'lib/specify/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) ⇒ Object



12
13
14
# File 'lib/specify/rspec/reporter.rb', line 12

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) ⇒ Object



20
21
22
# File 'lib/specify/rspec/reporter.rb', line 20

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) ⇒ Object

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



8
9
10
# File 'lib/specify/rspec/reporter.rb', line 8

def example_step_started(example, type, message, options)
  notify :example_step_started, Notification.new(example, type, message, options)
end

#find_registered_formatter(cls) ⇒ Object



28
29
30
# File 'lib/specify/rspec/reporter.rb', line 28

def find_registered_formatter(cls)
  registered_formatters.detect { |formatter| formatter.class == cls }
end

#registered_formattersObject



24
25
26
# File 'lib/specify/rspec/reporter.rb', line 24

def registered_formatters
  @listeners.values.map(&:to_a).flatten.uniq
end