Module: DeepTest::FailureMessage
- Defined in:
- lib/deep_test/failure_message.rb
Class Method Summary collapse
Class Method Details
.show(title, message, width = 70) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/deep_test/failure_message.rb', line 3 def self.show(title, , width = 70) lines = [" #{title} ".center(width, '*')] .each do |line| lines << "* #{line.strip}".ljust(width - 1) + "*" end lines << "*" * width string = lines.join("\n") begin puts string rescue IO.new(2) do |err| err.puts string end end end |