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
15 16 17 |
# File 'lib/specify/rspec/reporter.rb', line 15 def example_step_failed(example, type, , ) notify :example_step_failed, Notification.new(example, type, , ) end |
#example_step_passed(example, type, message, options) ⇒ Object
11 12 13 |
# File 'lib/specify/rspec/reporter.rb', line 11 def example_step_passed(example, type, , ) notify :example_step_passed, Notification.new(example, type, , ) end |
#example_step_pending(example, type, message, options) ⇒ Object
19 20 21 |
# File 'lib/specify/rspec/reporter.rb', line 19 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.
7 8 9 |
# File 'lib/specify/rspec/reporter.rb', line 7 def example_step_started(example, type, , ) notify :example_step_started, Notification.new(example, type, , ) end |
#find_registered_formatter(cls) ⇒ Object
27 28 29 |
# File 'lib/specify/rspec/reporter.rb', line 27 def find_registered_formatter(cls) registered_formatters.detect { |formatter| formatter.class == cls } end |
#registered_formatters ⇒ Object
23 24 25 |
# File 'lib/specify/rspec/reporter.rb', line 23 def registered_formatters @listeners.values.map(&:to_a).flatten.uniq end |