diff --git a/src/testup/file_reporter.rb b/src/testup/file_reporter.rb index 4001990..e36e353 100644 --- a/src/testup/file_reporter.rb +++ b/src/testup/file_reporter.rb @@ -75,7 +75,10 @@ def report def record(result) super - io.puts "%s#%s = %.2f s = %s" % [result.class, + unless instance_variable_defined? :@has_klass + @has_klass = result.instance_variable_defined? :@klass + end + io.puts "%s#%s = %.2f s = %s" % [@has_klass ? result.klass : result.class, result.name, result.time, result.result_code] diff --git a/src/testup/reporter.rb b/src/testup/reporter.rb index 6833d62..15dde64 100644 --- a/src/testup/reporter.rb +++ b/src/testup/reporter.rb @@ -59,8 +59,11 @@ def record(result) private def process_results(result) + unless instance_variable_defined? :@has_klass + @has_klass = result.instance_variable_defined? :@klass + end { - :testname => "#{result.class.name}##{result.name}", + :testname => "#{@has_klass ? result.klass : result.class}##{result.name}", :time => result.time, :skipped => result.skipped?, :error => result.error?,