Make Test::Unit display errors earlier
Just a monkey patch to make Test::Unit display errors as soon as they happen.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
require 'test/unit' require 'test/unit/ui/console/testrunner' class Test::Unit::UI::Console::TestRunner def add_fault(fault) hax_output(fault) @faults << fault output_single(fault.single_character_display, 1) @already_outputted = true end def hax_output(fault) @io.puts("\n") output_single(fault.short_display, 1) # fault.long_display for the full trace @io.puts("\n") end end> |
Useful when your tests take too long to run.
Images:


Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago