Class: Distributest::Formatter::BasicFormat
- Inherits:
-
Spec::Runner::Formatter::BaseFormatter
- Object
- Spec::Runner::Formatter::BaseFormatter
- Distributest::Formatter::BasicFormat
- Defined in:
- lib/distributest/formatter.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
- #dump_failure(counter, failure) ⇒ Object
- #dump_summary(duration, example, failure, pending) ⇒ Object
- #example_failed(example_proxy, counter, failure) ⇒ Object
- #example_passed(example) ⇒ Object
- #example_pending(example_proxy, message, deprecated_pending_location = nil) ⇒ Object
- #example_started(example) ⇒ Object
-
#initialize(output, errors, profile) ⇒ BasicFormat
constructor
A new instance of BasicFormat.
Constructor Details
#initialize(output, errors, profile) ⇒ BasicFormat
Returns a new instance of BasicFormat.
7 8 9 10 11 |
# File 'lib/distributest/formatter.rb', line 7 def initialize(output, errors, profile) @output = output @errors = errors @profile = profile end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
5 6 7 |
# File 'lib/distributest/formatter.rb', line 5 def errors @errors end |
#output ⇒ Object
Returns the value of attribute output.
5 6 7 |
# File 'lib/distributest/formatter.rb', line 5 def output @output end |
Instance Method Details
#dump_failure(counter, failure) ⇒ Object
34 35 |
# File 'lib/distributest/formatter.rb', line 34 def dump_failure(counter, failure) end |
#dump_summary(duration, example, failure, pending) ⇒ Object
13 14 15 |
# File 'lib/distributest/formatter.rb', line 13 def dump_summary(duration, example, failure, pending) #hiding summary atm end |
#example_failed(example_proxy, counter, failure) ⇒ Object
26 27 28 |
# File 'lib/distributest/formatter.rb', line 26 def example_failed(example_proxy, counter, failure) errors << [failure.header.to_s, failure.exception.to_s, failure.exception.backtrace.join("\n")] end |
#example_passed(example) ⇒ Object
21 22 23 24 |
# File 'lib/distributest/formatter.rb', line 21 def example_passed(example) @profile << [example.description, Time.now - @time] output << '.' end |
#example_pending(example_proxy, message, deprecated_pending_location = nil) ⇒ Object
30 31 32 |
# File 'lib/distributest/formatter.rb', line 30 def example_pending(example_proxy, , deprecated_pending_location = nil) output << '*' end |
#example_started(example) ⇒ Object
17 18 19 |
# File 'lib/distributest/formatter.rb', line 17 def example_started(example) @time = Time.now end |