Class: Flatware::RSpec::Formatter
- Inherits:
-
Object
- Object
- Flatware::RSpec::Formatter
- Defined in:
- lib/flatware/rspec/formatter.rb
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
- #close ⇒ Object
- #dump_failures(failure_notification) ⇒ Object
- #dump_summary(summary) ⇒ Object
- #example_failed(example) ⇒ Object
- #example_passed(example) ⇒ Object
- #example_pending(example) ⇒ Object
-
#initialize(stdout) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(stdout) ⇒ Formatter
Returns a new instance of Formatter.
12 13 14 |
# File 'lib/flatware/rspec/formatter.rb', line 12 def initialize(stdout) @output = stdout end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
10 11 12 |
# File 'lib/flatware/rspec/formatter.rb', line 10 def output @output end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
10 11 12 |
# File 'lib/flatware/rspec/formatter.rb', line 10 def summary @summary end |
Instance Method Details
#close ⇒ Object
36 37 38 39 |
# File 'lib/flatware/rspec/formatter.rb', line 36 def close(*) Sink::client.checkpoint Checkpoint.new(summary, @failure_notification) @failure_notification = nil end |
#dump_failures(failure_notification) ⇒ Object
32 33 34 |
# File 'lib/flatware/rspec/formatter.rb', line 32 def dump_failures(failure_notification) @failure_notification = failure_notification end |
#dump_summary(summary) ⇒ Object
28 29 30 |
# File 'lib/flatware/rspec/formatter.rb', line 28 def dump_summary(summary) @summary = Summary.from_notification(summary) end |
#example_failed(example) ⇒ Object
20 21 22 |
# File 'lib/flatware/rspec/formatter.rb', line 20 def example_failed(example) send_progress :failed end |
#example_passed(example) ⇒ Object
16 17 18 |
# File 'lib/flatware/rspec/formatter.rb', line 16 def example_passed(example) send_progress :passed end |
#example_pending(example) ⇒ Object
24 25 26 |
# File 'lib/flatware/rspec/formatter.rb', line 24 def example_pending(example) send_progress :pending end |