Class Index [+]

Quicksearch

Spec::Runner::Formatter::NestedTextFormatter

Constants

INDENT

Public Class Methods

new(options, where) click to toggle source
    # File lib/spec/runner/formatter/nested_text_formatter.rb, line 10
10:         def initialize(options, where)
11:           super
12:           @last_nested_descriptions = []
13:         end

Public Instance Methods

current_indentation() click to toggle source
    # File lib/spec/runner/formatter/nested_text_formatter.rb, line 44
44:         def current_indentation
45:           INDENT*@last_nested_descriptions.length
46:         end
example_failed(example, counter, failure) click to toggle source
    # File lib/spec/runner/formatter/nested_text_formatter.rb, line 27
27:         def example_failed(example, counter, failure)
28:           output.puts(red("#{current_indentation}#{example.description} (FAILED - #{counter})"))
29:           output.flush
30:         end
example_group_started(example_group) click to toggle source
    # File lib/spec/runner/formatter/nested_text_formatter.rb, line 15
15:         def example_group_started(example_group)
16:           super
17: 
18:           example_group.nested_descriptions.each_with_index do |nested_description, i|
19:             unless example_group.nested_descriptions[0..i] == @last_nested_descriptions[0..i]
20:               output.puts "#{INDENT*i}#{nested_description}"
21:             end
22:           end
23: 
24:           @last_nested_descriptions = example_group.nested_descriptions
25:         end
example_passed(example) click to toggle source
    # File lib/spec/runner/formatter/nested_text_formatter.rb, line 32
32:         def example_passed(example)
33:           message = "#{current_indentation}#{example.description}"
34:           output.puts green(message)
35:           output.flush
36:         end
example_pending(example, message, deprecated_pending_location=nil) click to toggle source
    # File lib/spec/runner/formatter/nested_text_formatter.rb, line 38
38:         def example_pending(example, message, deprecated_pending_location=nil)
39:           super
40:           output.puts yellow("#{current_indentation}#{example.description} (PENDING: #{message})")
41:           output.flush
42:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.