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



20
21
22
23
24
25
# File 'lib/utils/line_formatter.rb', line 20

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



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

def dump_commands_to_rerun_failed_examples
end

#dump_failuresObject



44
45
# File 'lib/utils/line_formatter.rb', line 44

def dump_failures
end

#dump_pendingObject



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

def dump_pending
end

#example_failed(example) ⇒ Object



37
38
39
40
41
42
# File 'lib/utils/line_formatter.rb', line 37

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



27
28
29
30
# File 'lib/utils/line_formatter.rb', line 27

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

#example_pending(example) ⇒ Object



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

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

#start(example_count) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/utils/line_formatter.rb', line 12

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