Module: KnockOutput

Defined in:
lib/output/knock_output.rb

Instance Method Summary collapse

Instance Method Details

#handle_requirement(description) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/output/knock_output.rb', line 4

def handle_requirement(description)
  ErrorLog.replace ""
  error = yield
  if error.empty?
    puts "ok - %s" % [description]
  else
    puts "not ok - %s: %s" % [description, error]
    puts ErrorLog.strip.gsub(/^/, '# ')  if Backtraces
  end
end

#handle_specification(name) ⇒ Object



2
# File 'lib/output/knock_output.rb', line 2

def handle_specification(name)  yield  end

#handle_summary(started_at) ⇒ Object



15
# File 'lib/output/knock_output.rb', line 15

def handle_summary(started_at);  end