Class: Flatware::RSpec::ExamplesNotification
- Inherits:
-
Object
- Object
- Flatware::RSpec::ExamplesNotification
- Defined in:
- lib/flatware/rspec/examples_notification.rb
Instance Attribute Summary collapse
-
#failure_notifications ⇒ Object
readonly
Returns the value of attribute failure_notifications.
Instance Method Summary collapse
- #+(other) ⇒ Object
- #fully_formatted_failed_examples ⇒ Object
-
#initialize(failure_notifications) ⇒ ExamplesNotification
constructor
A new instance of ExamplesNotification.
Constructor Details
#initialize(failure_notifications) ⇒ ExamplesNotification
Returns a new instance of ExamplesNotification.
7 8 9 |
# File 'lib/flatware/rspec/examples_notification.rb', line 7 def initialize(failure_notifications) @failure_notifications = failure_notifications.map(&ExampleNotification.method(:new)) end |
Instance Attribute Details
#failure_notifications ⇒ Object (readonly)
Returns the value of attribute failure_notifications.
5 6 7 |
# File 'lib/flatware/rspec/examples_notification.rb', line 5 def failure_notifications @failure_notifications end |
Instance Method Details
#+(other) ⇒ Object
11 12 13 |
# File 'lib/flatware/rspec/examples_notification.rb', line 11 def +(other) self.class.new failure_notifications + other.failure_notifications end |
#fully_formatted_failed_examples ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/flatware/rspec/examples_notification.rb', line 15 def fully_formatted_failed_examples(*) formatted = "\n\nFailures:\n" failure_notifications.each_with_index do |failure, index| formatted << failure.fully_formatted(index.next) end formatted end |