lib/cucumber/formatter/console.rb in cucumber-0.10.2 vs lib/cucumber/formatter/console.rb in cucumber-0.10.3
- old
+ new
@@ -26,14 +26,16 @@
format_string(line, status)
end
def format_string(string, status)
fmt = format_for(status)
- if Proc === fmt
- fmt.call(string)
- else
- fmt % string
- end
+ string.split("\n").map do |line|
+ if Proc === fmt
+ fmt.call(line)
+ else
+ fmt % line
+ end
+ end.join("\n")
end
def print_steps(status)
print_elements(step_mother.steps(status), status, 'steps')
end