From b5e57b6df6db9adf784968db466ca9f46f54cd69 Mon Sep 17 00:00:00 2001 From: Graeme Mathieson Date: Mon, 4 May 2009 18:18:17 +0100 Subject: [PATCH] Set the prefix to be features, rather than cucumber. This makes it push the reports into a consistent location if CI_REPORTS is not set. --- acceptance/verification_spec.rb | 14 +++++++------- lib/ci/reporter/cucumber.rb | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/acceptance/verification_spec.rb b/acceptance/verification_spec.rb index 0ead601..e0b4666 100644 --- a/acceptance/verification_spec.rb +++ b/acceptance/verification_spec.rb @@ -65,15 +65,15 @@ describe "Cucumber acceptance" do it "should generate three XML files" do - File.exist?(File.join(REPORTS_DIR, 'CUCUMBER-Feature-Example-feature-Conscientious-developer.xml')).should == true - File.exist?(File.join(REPORTS_DIR, 'CUCUMBER-Feature-Example-feature-Lazy-hacker.xml')).should == true - File.exist?(File.join(REPORTS_DIR, 'CUCUMBER-Feature-Example-feature-Bad-coder.xml')).should == true + File.exist?(File.join(REPORTS_DIR, 'FEATURES-Feature-Example-feature-Conscientious-developer.xml')).should == true + File.exist?(File.join(REPORTS_DIR, 'FEATURES-Feature-Example-feature-Lazy-hacker.xml')).should == true + File.exist?(File.join(REPORTS_DIR, 'FEATURES-Feature-Example-feature-Bad-coder.xml')).should == true - Dir["#{REPORTS_DIR}/CUCUMBER-*.xml"].length.should == 3 + Dir["#{REPORTS_DIR}/FEATURES-*.xml"].length.should == 3 end it "should have three tests and no failures for the conscientious developer" do - doc = File.open(File.join(REPORTS_DIR, 'CUCUMBER-Feature-Example-feature-Conscientious-developer.xml')) do |f| + doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Feature-Example-feature-Conscientious-developer.xml')) do |f| REXML::Document.new(f) end doc.root.attributes["errors"].should == "0" @@ -83,7 +83,7 @@ end it "should have three tests and one failure for the lazy hacker" do - doc = File.open(File.join(REPORTS_DIR, 'CUCUMBER-Feature-Example-feature-Lazy-hacker.xml')) do |f| + doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Feature-Example-feature-Lazy-hacker.xml')) do |f| REXML::Document.new(f) end doc.root.attributes["errors"].should == "0" @@ -97,7 +97,7 @@ end it "should have three tests and one failure for the bad coder" do - doc = File.open(File.join(REPORTS_DIR, 'CUCUMBER-Feature-Example-feature-Bad-coder.xml')) do |f| + doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Feature-Example-feature-Bad-coder.xml')) do |f| REXML::Document.new(f) end doc.root.attributes["errors"].should == "0" diff --git a/lib/ci/reporter/cucumber.rb b/lib/ci/reporter/cucumber.rb index f10576e..6a138d0 100644 --- a/lib/ci/reporter/cucumber.rb +++ b/lib/ci/reporter/cucumber.rb @@ -51,7 +51,7 @@ class Cucumber < ::Cucumber::Ast::Visitor attr_accessor :test_suite, :report_manager, :feature_name def initialize(step_mother, io, options) - self.report_manager = ReportManager.new("cucumber") + self.report_manager = ReportManager.new("features") super(step_mother) end