Class: AreWeThereYet::Recorder
- Inherits:
-
Spec::Runner::Formatter::BaseFormatter
- Object
- Spec::Runner::Formatter::BaseFormatter
- AreWeThereYet::Recorder
- Defined in:
- lib/are_we_there_yet/recorder.rb
Instance Method Summary collapse
- #close ⇒ Object
- #example_passed(example) ⇒ Object
- #example_started(example) ⇒ Object
-
#initialize(options, where) ⇒ Recorder
constructor
A new instance of Recorder.
Constructor Details
#initialize(options, where) ⇒ Recorder
Returns a new instance of Recorder.
3 4 5 6 7 8 9 |
# File 'lib/are_we_there_yet/recorder.rb', line 3 def initialize(,where) @db = AreWeThereYet::Persistence::Connection.create(where) AreWeThereYet::Persistence::Schema.create(@db) log_run end |
Instance Method Details
#close ⇒ Object
19 20 21 22 |
# File 'lib/are_we_there_yet/recorder.rb', line 19 def close @run.finish(@db) @db.disconnect end |
#example_passed(example) ⇒ Object
15 16 17 |
# File 'lib/are_we_there_yet/recorder.rb', line 15 def example_passed(example) persist_metric(example) end |
#example_started(example) ⇒ Object
11 12 13 |
# File 'lib/are_we_there_yet/recorder.rb', line 11 def example_started(example) @start = Time.now end |