Class: Cucumber::Distrib::Events::TestCaseFinished
- Inherits:
-
BaseTestCaseEvent
- Object
- Event
- BaseTestCaseEvent
- Cucumber::Distrib::Events::TestCaseFinished
- Defined in:
- lib/cucumber/distrib/events.rb
Overview
Object that mimic Cucumber::Event::TestCaseFinished on Leader for reporters.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Attributes inherited from BaseTestCaseEvent
Instance Method Summary collapse
- #attributes ⇒ Array<String>
-
#initialize(event) ⇒ TestCaseFinished
constructor
A new instance of TestCaseFinished.
Methods inherited from Event
Constructor Details
#initialize(event) ⇒ TestCaseFinished
Returns a new instance of TestCaseFinished.
361 362 363 364 365 366 367 368 369 370 |
# File 'lib/cucumber/distrib/events.rb', line 361 def initialize(event) super if event.result.is_a? ::Cucumber::Core::Test::Result::Failed exception = ::Cucumber::Distrib::Events::Exception.new(event.result.exception) @result = ::Cucumber::Core::Test::Result::Failed.new(event.result.duration, exception) else @result = event.result end end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
358 359 360 |
# File 'lib/cucumber/distrib/events.rb', line 358 def result @result end |
Instance Method Details
#attributes ⇒ Array<String>
373 374 375 |
# File 'lib/cucumber/distrib/events.rb', line 373 def attributes [test_case, result] end |