lib/minitest/utils/reporter.rb in minitest-utils-0.1.0 vs lib/minitest/utils/reporter.rb in minitest-utils-0.1.1
- old
+ new
@@ -53,28 +53,28 @@
pluralize('skip', skips),
].join(', ')
end
def indent(text)
- text.gsub(/^/, ' ')
+ text.gsub(/^/, ' ')
end
def display_failing(result, index)
backtrace = backtrace(result.failure.backtrace)
message = result.failure.message
message = message.lines.tap(&:pop).join.chomp if result.error?
str = "\n\n"
- str << color("#{index}) #{result_name(result.name)}")
+ str << color("%4d) %s" % [index, result_name(result.name)])
str << "\n" << color(indent(message), :red)
str << "\n" << color(backtrace, :blue)
io.print str
end
def display_skipped(result, index)
location = location(result.failure.location)
str = "\n\n"
- str << color("#{index}) #{result_name(result.name)} [SKIPPED]", :yellow)
+ str << color("%4d) %s [SKIPPED]" % [index, result_name(result.name)], :yellow)
str << "\n" << indent(color(location, :yellow))
io.print str
end
def display_replay_command(result)