Skip to content

Commit

Permalink
Add red/green output
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyhaines committed Jan 31, 2010
1 parent e0fada6 commit be78f33
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/consoleReportForRake.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
(function($) {
$(Screw).bind("before", function(){
$('.it')
var colors = {'pass': '32', 'fail': '31'};
function colorize(text, status){
return "\u001B[" + colors[status] + "m" + text + "\u001B[0m";
}
$('.it')
.bind('passed', function(){
java.lang.System.out.print(".");
java.lang.System.out.print(colorize('.', 'pass'));
})
.bind('failed', function(e, reason){
print("\nFAILED: " + BlueRidge.CommandLine.exampleName(this));
print(" " + reason + "\n");
print(colorize("\nFAILED: " + BlueRidge.CommandLine.exampleName(this), 'fail'));
print(colorize(" " + reason + "\n", 'fail'));
});
});

Expand Down

0 comments on commit be78f33

Please sign in to comment.