Module: RSpec::Specify::Reporter
- Defined in:
- lib/specify/rspec/reporter.rb
Instance Method Summary collapse
- #example_step_failed(example, type, message, options) ⇒ Object
- #example_step_passed(example, type, message, options) ⇒ Object
- #example_step_pending(example, type, message, options) ⇒ Object
-
#example_step_started(example, type, message, options) ⇒ Object
An RSpec reporter sends notifications to listeners.
- #find_registered_formatter(cls) ⇒ Object
- #registered_formatters ⇒ Object
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, , ) notify :example_step_failed, Notification.new(example, type, , ) 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, , ) notify :example_step_passed, Notification.new(example, type, , ) 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, , ) notify :example_step_pending, Notification.new(example, type, , ) 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, , ) notify :example_step_started, Notification.new(example, type, , ) 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_formatters ⇒ Object
24 25 26 |
# File 'lib/specify/rspec/reporter.rb', line 24 def registered_formatters @listeners.values.map(&:to_a).flatten.uniq end |