Class Index [+]

Quicksearch

RSpec::Core::Formatters::DocumentationFormatter

Public Class Methods

new(output) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 7
 7:         def initialize(output)
 8:           super(output)
 9:           @group_level = 0
10:         end

Public Instance Methods

current_indentation() click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 57
57:         def current_indentation
58:           '  ' * @group_level
59:         end
example_failed(example) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 35
35:         def example_failed(example)
36:           super(example)
37:           output.puts failure_output(example, example.execution_result[:exception])
38:         end
example_group_chain() click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 61
61:         def example_group_chain
62:           example_group.ancestors.reverse
63:         end
example_group_finished(example_group) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 21
21:         def example_group_finished(example_group)
22:           @group_level -= 1
23:         end
example_group_started(example_group) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 12
12:         def example_group_started(example_group)
13:           super(example_group)
14: 
15:           output.puts if @group_level == 0
16:           output.puts "#{current_indentation}#{example_group.description.strip}"
17: 
18:           @group_level += 1
19:         end
example_passed(example) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 25
25:         def example_passed(example)
26:           super(example)
27:           output.puts passed_output(example)
28:         end
example_pending(example) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 30
30:         def example_pending(example)
31:           super(example)
32:           output.puts pending_output(example, example.execution_result[:pending_message])
33:         end
failure_output(example, exception) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 40
40:         def failure_output(example, exception)
41:           red("#{current_indentation}#{example.description.strip} (FAILED - #{next_failure_index})")
42:         end
next_failure_index() click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 44
44:         def next_failure_index
45:           @next_failure_index ||= 0
46:           @next_failure_index += 1
47:         end
passed_output(example) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 49
49:         def passed_output(example)
50:           green("#{current_indentation}#{example.description.strip}")
51:         end
pending_output(example, message) click to toggle source
    # File lib/rspec/core/formatters/documentation_formatter.rb, line 53
53:         def pending_output(example, message)
54:           yellow("#{current_indentation}#{example.description.strip} (PENDING: #{message})")
55:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.