bin/jazrb in smparkes-jazrb-0.0.11 vs bin/jazrb in smparkes-jazrb-0.0.12
- old
+ new
@@ -86,12 +86,13 @@
# p attrs
case name
when "testsuites";
when "testsuite";
@testsuite_name = attrs["name"]
- if @testcase_pending = ( attrs["skipped"] == "true" )
+ if @testsuite_pending = ( attrs["skipped"] == "true" )
$spec_info[:specs] << (tc = {})
+ tc[:name] = @testsuite_name
$spec_info[:pending] << $spec_info[:specs].last
end
when "testcase";
$spec_info[:specs] << (tc = {})
tc[:name] = @testsuite_name + " : " + attrs["name"]
@@ -114,17 +115,20 @@
def end_element name
case name
when "testsuites";
raise Restart
when "testsuite";
+ if @testsuite_pending
+ char = yellow("*")
+ print char
+ $stdout.flush
+ end
when "testcase";
if !$jazrb_xml
char = nil
if @testcase_failed
char = red("F")
- elsif @testcase_pending
- char = yellow("*")
else
char = green(".")
end
print char
$stdout.flush
@@ -171,9 +175,17 @@
EM.popen cmd, WriteToNokogiri
end
puts
puts
if !$jazrb_xml
+ if $spec_info[:pending].length > 0
+ puts "Pending:"
+ $spec_info[:pending].each do |pending|
+ puts
+ puts yellow(pending[:name])
+ end
+ puts "\n"
+ end
$spec_info[:failures].each_with_index do |failure,i|
print i+1,")\n"
print red("#{failure[:name]} FAILED\n")
print red(failure[:message]),"\n"
# double check, but is there really anything in the jaz stack that's useful?