Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from pitr/fix_last_reset

cancel colours by adding reset at the end
  • Loading branch information...
commit 18c913934eabe02d1b6edc2cccda3f963d535f3d 2 parents 745e356 + e118e5a
@txus authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/a.rb
12 lib/a.rb
@@ -1,6 +1,6 @@
-$;$f=[];$c=[];$a=0;class A;def a c;$a+=1;print c ?"\e[32m.\e[0m":($f\
-<<caller[0];"\e[31mF\e[0m");end;def self.inherited(b);$c<<b;end;end;at_exit{$c\{|t|;i.setup rescue nil;$t=t.instance_methods(false).map{|m|i.send\
-m if !%w(setup teardown).include? m}.compact;i.teardown rescue nil};print "\n#{$n} s.\n#{$t.size} tests, #{$a} assertions, #{$f.size} failures\n\n"+
-${|f|"\e[31mFailure\e[0m \e[97m@\e[33m #{f}"}.join("\n");exit -1 if $f[0]}
+at_exit{${|t|;i.setup rescue 0;$t=t.instance_methods(!0).map{|m|i.\
+send m if !(%w(setup teardown)&[m])[0]}.compact;i.teardown rescue 0};printf"\e\
+[0m\n%fs\n%d tests, %d assertions, %d failures\n\n%s",$n,$t.size,$a,$f
+.size,${|f|"\e[1;31mFailure\e[0m \e[97m@\e[33m #{f}\e[0m"}.join(?\n);exit\
+1 if$f[0]};class A;def a c;$a+=1;print"\e[3"+(c ?"2m.":"1mF");$f<<caller[0]if !
+c;end;def A.inherited(b);$c<<b;end;end; $n =; $f = []; $c = []; $a = 0
Please sign in to comment.
Something went wrong with that request. Please try again.