Class: Dogespec::Formatter
- Inherits:
-
RSpec::Core::Formatters::DocumentationFormatter
- Object
- RSpec::Core::Formatters::DocumentationFormatter
- Dogespec::Formatter
- Defined in:
- lib/dogespec/formatter.rb
Instance Method Summary collapse
- #failure_output(example, exception) ⇒ Object
-
#initialize(output) ⇒ Formatter
constructor
A new instance of Formatter.
- #passed_output(example) ⇒ Object
- #pending_output(example, message) ⇒ Object
Constructor Details
#initialize(output) ⇒ Formatter
Returns a new instance of Formatter.
6 7 8 9 |
# File 'lib/dogespec/formatter.rb', line 6 def initialize(output) super(output) @dogeifier = Dogeify.new end |
Instance Method Details
#failure_output(example, exception) ⇒ Object
21 22 23 24 |
# File 'lib/dogespec/formatter.rb', line 21 def failure_output(example, exception) msg = "#{dogeify(example.description.strip)} (FAILED: #{next_failure_index})" failure_color("#{current_indentation}#{msg}") end |
#passed_output(example) ⇒ Object
11 12 13 14 |
# File 'lib/dogespec/formatter.rb', line 11 def passed_output(example) msg = dogeify(example.description.strip) success_color("#{current_indentation}#{msg}") end |
#pending_output(example, message) ⇒ Object
16 17 18 19 |
# File 'lib/dogespec/formatter.rb', line 16 def pending_output(example, ) msg = "#{dogeify(example.description.strip)} (PENDING: #{dogeify()})" pending_color("#{current_indentation}#{msg}") end |