lib/test/tap/test_case.rb in tap_out-0.0.1 vs lib/test/tap/test_case.rb in tap_out-0.0.2

- old
+ new

@@ -10,10 +10,12 @@ def run(result) dummy, ok, failure, case_name, test_name = /^(ok|not ok) \d+ - ((?:\w+: )?)(\w+)::(.+)$/.match(@tap_line).to_a name = "#{sanitize_test_name test_name}(#{case_name})" yield(Test::Unit::TestCase::STARTED, name) - if ok == 'not ok' + if ok.nil? + result.add_error( RuntimeError.new @tap_line) + elsif ok == 'not ok' if failure.chomp(': ') == 'Failure' # If PHPUnit would return more info, we could fill this out result.add_failure(Test::Unit::Failure.new(name, [], failure_message)) else #TODO add_error