From 8fccb4132e82b29b1dcab4c10af8599d5492b3e6 Mon Sep 17 00:00:00 2001 From: Derek Ekins Date: Tue, 19 Jul 2011 09:38:19 +0100 Subject: [PATCH] added option to change output path of report --- lib/hydra/listener/cucumber_html_report.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/hydra/listener/cucumber_html_report.rb b/lib/hydra/listener/cucumber_html_report.rb index a2f43d2..9b74e35 100644 --- a/lib/hydra/listener/cucumber_html_report.rb +++ b/lib/hydra/listener/cucumber_html_report.rb @@ -10,9 +10,10 @@ module Hydra #:nodoc: end class CombineHtml - def initialize + def initialize(output_file = nil) @results_path = File.join(Dir.pwd, 'results') - @io = File.open(File.join(@results_path, 'report.html'), "w") + output_file = File.join(@results_path, 'html/index.html') if output_file.nil? + @io = File.open(output_file, "w") @builder = create_builder(@io) end