Module: MotionSpec::KnockOutput
- Defined in:
- lib/motion-spec/output/knock.rb
Instance Method Summary collapse
- #handle_requirement_begin(description) ⇒ Object
- #handle_requirement_end(error) ⇒ Object
- #handle_specification_begin(name) ⇒ Object
- #handle_specification_end ⇒ Object
- #handle_summary ⇒ Object
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_end ⇒ Object
5 |
# File 'lib/motion-spec/output/knock.rb', line 5 def handle_specification_end; end |
#handle_summary ⇒ Object
21 |
# File 'lib/motion-spec/output/knock.rb', line 21 def handle_summary; end |