[Nitro] Og tests helper
Arne Brasseur
arne at arnebrasseur.net
Mon Sep 3 05:31:34 EDT 2007
George Moschovitis schreef:
> (in /home/gmosx/code/public)
> Running og... [ 1 specs - 0 failed ]
> Running og/store/sql... [ 1 specs - 0 failed ]
> Running og/validation... [ 1 specs - all passed ]
> -------------------------------------[ og
> ]-------------------------------------
> ExitStatus:
> #<Process::Status: pid=13203,exited(0)>
> StdOut:
> Database "test" dropped
> .
>
> Finished in 0.136994 seconds
>
> 1 example, 0 failures
>
> The problem seems to be that the system command used to drop the
> database before each test. It seems to trigger the error code in
> script/lib/wrap.rb...
Actually the problem seems to be that some ANSI control codes (or
something that looks like it) are sent to StdErr. Because the test
outputs on StdErr it is shown in red and the details are given. If you
change line 159 in script/lib/wrap.rb from
puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr
to
puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr.inspect
you will see this:
-------------------------------------[ og
]-------------------------------------
ExitStatus:
#<Process::Status: pid=11423,exited(0)>
StdOut:
.
Finished in 0.418628 seconds
1 example, 0 failures
StdErr:
"\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m"
nil
--------------------------------[ og/store/sql
]--------------------------------
ExitStatus:
#<Process::Status: pid=11426,exited(0)>
StdOut:
.
Finished in 0.359741 seconds
1 example, 0 failures
StdErr:
"\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m"
(ab)
--
Arne Brasseur
http://www.arnebrasseur.net
arne at arnebrasseur.net
More information about the Nitro-general
mailing list