Class: Utils::LineFormatter

Inherits:
RSpec::Core::Formatters::BaseTextFormatter
  • Object
show all
Defined in:
lib/utils/line_formatter.rb

Instance Method Summary collapse

Instance Method Details

#closeObject



24
25
26
27
28
29
# File 'lib/utils/line_formatter.rb', line 24

def close
  super
  @errors_lst.puts "\n#{?= * 75}\nFinished in #{format_duration(duration)}\n"
  @errors_lst.puts summary_line(example_count, failure_count, pending_count)
  @errors_lst.close
end

#dump_commands_to_rerun_failed_examplesObject



54
55
# File 'lib/utils/line_formatter.rb', line 54

def dump_commands_to_rerun_failed_examples
end

#dump_failuresObject



48
49
# File 'lib/utils/line_formatter.rb', line 48

def dump_failures
end

#dump_pendingObject



51
52
# File 'lib/utils/line_formatter.rb', line 51

def dump_pending
end

#example_failed(example) ⇒ Object



41
42
43
44
45
46
# File 'lib/utils/line_formatter.rb', line 41

def example_failed(example)
  super
  dump_line_to_error_file(example)
  output.puts format_line(example)
  dump_failure_info(example)
end

#example_passed(example) ⇒ Object



31
32
33
34
# File 'lib/utils/line_formatter.rb', line 31

def example_passed(example)
  super
  output.puts format_line(example)
end

#example_pending(example) ⇒ Object



36
37
38
39
# File 'lib/utils/line_formatter.rb', line 36

def example_pending(example)
  super
  output.puts format_line(example)
end

#start(example_count) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/utils/line_formatter.rb', line 16

def start(example_count)
  super
  filename = 'errors.lst'
  output.puts "Storing error list in #{filename.inspect}: "
  @errors_lst = File.new(filename, 'w')
  @errors_lst.sync = true
end