Module: MotionSpec::KnockOutput

Defined in:
lib/motion-spec/output/knock.rb

Instance Method Summary collapse

Instance Method Details

#handle_requirement_begin(description) ⇒ Object



7
8
9
10
# File 'lib/motion-spec/output/knock.rb', line 7

def handle_requirement_begin(description)
  @description = description
  ErrorLog.replace ''
end

#handle_requirement_end(error) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/motion-spec/output/knock.rb', line 12

def handle_requirement_end(error)
  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_begin(name) ⇒ Object



4
# File 'lib/motion-spec/output/knock.rb', line 4

def handle_specification_begin(name); end

#handle_specification_endObject



5
# File 'lib/motion-spec/output/knock.rb', line 5

def handle_specification_end; end

#handle_summaryObject



21
# File 'lib/motion-spec/output/knock.rb', line 21

def handle_summary; end