Class: Flatware::RSpec::Marshalable::ProfileNotification
- Inherits:
-
RSpec::Core::Notifications::ProfileNotification
- Object
- RSpec::Core::Notifications::ProfileNotification
- Flatware::RSpec::Marshalable::ProfileNotification
- Defined in:
- lib/flatware/rspec/marshalable/profile_notification.rb
Instance Attribute Summary collapse
-
#example_groups ⇒ Object
readonly
Returns the value of attribute example_groups.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#example_groups ⇒ Object (readonly)
Returns the value of attribute example_groups.
8 9 10 |
# File 'lib/flatware/rspec/marshalable/profile_notification.rb', line 8 def example_groups @example_groups end |
Class Method Details
.from_rspec(rspec_notification) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/flatware/rspec/marshalable/profile_notification.rb', line 19 def self.from_rspec(rspec_notification) new( rspec_notification.duration, rspec_notification.examples.map(&Example.method(:new)), rspec_notification.number_of_examples, rspec_notification.instance_variable_get(:@example_groups).transform_keys(&ExampleGroup.method(:new)) ) end |
Instance Method Details
#+(other) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/flatware/rspec/marshalable/profile_notification.rb', line 10 def +(other) self.class.new( duration + other.duration, examples + other.examples, number_of_examples, example_groups.merge(other.example_groups) ) end |