Class: Torkify::Event::RanAllTestFilesEvent
- Inherits:
-
Struct
- Object
- Struct
- Torkify::Event::RanAllTestFilesEvent
- Includes:
- Message
- Defined in:
- lib/torkify/event/ran_all_test_files_event.rb
Overview
Event used when all tests have finished running.
The time method gives the approximate time in seconds that the tests took to run.
Instance Attribute Summary collapse
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#passed ⇒ Object
Returns the value of attribute passed.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, passed = [], failed = []) ⇒ RanAllTestFilesEvent
constructor
A new instance of RanAllTestFilesEvent.
- #stop! ⇒ Object
- #time ⇒ Object
Methods included from Message
Constructor Details
#initialize(type, passed = [], failed = []) ⇒ RanAllTestFilesEvent
Returns a new instance of RanAllTestFilesEvent.
12 13 14 15 |
# File 'lib/torkify/event/ran_all_test_files_event.rb', line 12 def initialize(type, passed = [], failed = []) @created = Time.now.to_f super end |
Instance Attribute Details
#failed ⇒ Object
Returns the value of attribute failed
9 10 11 |
# File 'lib/torkify/event/ran_all_test_files_event.rb', line 9 def failed @failed end |
#passed ⇒ Object
Returns the value of attribute passed
9 10 11 |
# File 'lib/torkify/event/ran_all_test_files_event.rb', line 9 def passed @passed end |
#type ⇒ Object
Returns the value of attribute type
9 10 11 |
# File 'lib/torkify/event/ran_all_test_files_event.rb', line 9 def type @type end |
Instance Method Details
#stop! ⇒ Object
17 18 19 20 21 22 |
# File 'lib/torkify/event/ran_all_test_files_event.rb', line 17 def stop! if @time.nil? @time = Time.now.to_f - @created end self end |
#time ⇒ Object
24 25 26 27 |
# File 'lib/torkify/event/ran_all_test_files_event.rb', line 24 def time stop! @time end |