Class: RSpec::Longrun::Formatter

Inherits:
Core::Formatters::BaseTextFormatter
  • Object
show all
Defined in:
lib/rspec/longrun/formatter.rb

Defined Under Namespace

Classes: Block

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ Formatter

Returns a new instance of Formatter.



8
9
10
11
# File 'lib/rspec/longrun/formatter.rb', line 8

def initialize(output)
  super(output)
  @blocks = [Block.new(true)]
end

Instance Method Details

#example_failed(example) ⇒ Object



38
39
40
41
# File 'lib/rspec/longrun/formatter.rb', line 38

def example_failed(example)
  super(example)
  end_block(failure_color("FAILED"))
end

#example_group_finished(example_group) ⇒ Object



18
19
20
21
# File 'lib/rspec/longrun/formatter.rb', line 18

def example_group_finished(example_group)
  super(example_group)
  end_block
end

#example_group_started(example_group) ⇒ Object



13
14
15
16
# File 'lib/rspec/longrun/formatter.rb', line 13

def example_group_started(example_group)
  super(example_group)
  begin_block(example_group.description)
end

#example_passed(example) ⇒ Object



28
29
30
31
# File 'lib/rspec/longrun/formatter.rb', line 28

def example_passed(example)
  super(example)
  end_block(success_color("OK"))
end

#example_pending(example) ⇒ Object



33
34
35
36
# File 'lib/rspec/longrun/formatter.rb', line 33

def example_pending(example)
  super(example)
  end_block(pending_color("PENDING: " + example.execution_result[:pending_message]))
end

#example_started(example) ⇒ Object



23
24
25
26
# File 'lib/rspec/longrun/formatter.rb', line 23

def example_started(example)
  super(example)
  begin_block(detail_color(example.description))
end

#step_finished(description) ⇒ Object



47
48
49
# File 'lib/rspec/longrun/formatter.rb', line 47

def step_finished(description)
  end_block
end

#step_started(description) ⇒ Object



43
44
45
# File 'lib/rspec/longrun/formatter.rb', line 43

def step_started(description)
  begin_block(description)
end