From 95fb1bd32a3556eef421a0d8fbbe5155e53aeb7d Mon Sep 17 00:00:00 2001 From: Watson Date: Fri, 18 Jan 2013 17:25:29 +0900 Subject: [PATCH] add a message of `describe' to description of tap's output ## before not ok 1 - has one window: FAILED ## after not ok 1 - Application 'test' has one window: FAILED --- lib/motion/spec.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/motion/spec.rb b/lib/motion/spec.rb index 4e14ca54..12bd7bcc 100644 --- a/lib/motion/spec.rb +++ b/lib/motion/spec.rb @@ -175,12 +175,18 @@ module Bacon module TapOutput @@count = 1 + @@describe = "" - def handle_specification_begin(name); end - def handle_specification_end ; end + def handle_specification_begin(name) + @@describe << "#{name} " + end + + def handle_specification_end + @@describe = "" + end def handle_requirement_begin(description) - @description = description + @description = @@describe + description ErrorLog.replace "" end