have the option for running code after step writer completes

This commit is contained in:
John Bintz 2012-04-18 17:02:23 -04:00
parent 6ed2459d61
commit e101321c58
2 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,7 @@ module Flowerbox
end end
def post_report_failed(data) ; end def post_report_failed(data) ; end
def report_numeric_results(gathered_results, data = {}) ; end def report_numeric_results(gathered_results, data = {}) ; end
def start(message) ; end def start(message) ; end

View File

@ -13,6 +13,14 @@ module Flowerbox::Reporter
self.puts "Writing #{target}..." self.puts "Writing #{target}..."
File.open(target, 'wb') { |fh| fh.print result.test_environment.obtain_test_definition_for(result) } File.open(target, 'wb') { |fh| fh.print result.test_environment.obtain_test_definition_for(result) }
post_report_data[:undefined] = true
end
end
def post_report_undefined(data)
if post_report_data[:undefined] && options[:on_finish]
options[:on_finish].call(options[:target])
end end
end end
end end