class QED::Reporter::Dot

The dot reporter is the traditional test reporter where dot is printed for every successful step, an ā€˜E’ for errors and an ā€˜F’ for failures.

Public Instance Methods

after_session(session) click to toggle source
# File lib/qed/reporter/dotprogress.rb, line 44
def after_session(session)
  print_time

  errors.each do |step, exception|
    backtrace = sane_backtrace(exception)

    io.puts "***** ERROR *****".ansi(:red)
    io.puts "#{exception}"
    backtrace.each do |bt|
      io.puts bt
      io.puts code_snippet(bt)
    end
    io.puts
  end

  fails.each do |step, assertion|
    backtrace = sane_backtrace(assertion)

    io.puts "***** FAIL *****".ansi(:red, :bold)
    io.puts "#{assertion}"
    backtrace.each do |bt|
      io.puts bt
      io.puts code_snippet(bt)
    end
    io.puts
  end

  print_tally
end
before_session(session) click to toggle source
# File lib/qed/reporter/dotprogress.rb, line 13
def before_session(session)
  @start_time = Time.now
  io.puts "Started"
end
error(step, exception) click to toggle source
Calls superclass method QED::Reporter::Abstract#error
# File lib/qed/reporter/dotprogress.rb, line 37
def error(step, exception)
  io.print "E".ansi(:red)
  io.flush
  super(step, exception)
end
fail(step, assertion) click to toggle source
Calls superclass method QED::Reporter::Abstract#fail
# File lib/qed/reporter/dotprogress.rb, line 31
def fail(step, assertion)
  io.print "F".ansi(:red)
  io.flush
  super(step, assertion)
end
pass(step) click to toggle source

def before_step(step)

super(step)
io.print "."
io.flush

end

Calls superclass method QED::Reporter::Abstract#pass
# File lib/qed/reporter/dotprogress.rb, line 25
def pass(step)
  io.print "."
  io.flush
  super(step)
end