Class: PercentageFormatter
- Inherits:
-
RSpec::Core::Formatters::BaseTextFormatter
- Object
- RSpec::Core::Formatters::BaseTextFormatter
- PercentageFormatter
- Defined in:
- lib/percentage_formatter.rb,
lib/percentage_formatter/output.rb
Defined Under Namespace
Classes: Output
Instance Attribute Summary collapse
-
#outputter ⇒ Object
Returns the value of attribute outputter.
Instance Method Summary collapse
- #example_failed(notification) ⇒ Object
- #example_started(notification) ⇒ Object
-
#initialize(output) ⇒ PercentageFormatter
constructor
A new instance of PercentageFormatter.
- #start(notification) ⇒ Object
Constructor Details
#initialize(output) ⇒ PercentageFormatter
Returns a new instance of PercentageFormatter.
9 10 11 12 13 |
# File 'lib/percentage_formatter.rb', line 9 def initialize(output) super self.outputter = PercentageFormatter::Output.new(output) end |
Instance Attribute Details
#outputter ⇒ Object
Returns the value of attribute outputter.
7 8 9 |
# File 'lib/percentage_formatter.rb', line 7 def outputter @outputter end |
Instance Method Details
#example_failed(notification) ⇒ Object
25 26 27 |
# File 'lib/percentage_formatter.rb', line 25 def example_failed(notification) outputter.failure(notification) end |
#example_started(notification) ⇒ Object
21 22 23 |
# File 'lib/percentage_formatter.rb', line 21 def example_started(notification) outputter.increment end |
#start(notification) ⇒ Object
15 16 17 18 19 |
# File 'lib/percentage_formatter.rb', line 15 def start(notification) super outputter.start(notification.count) end |