Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Set the prefix to be features, rather than cucumber.
Browse files Browse the repository at this point in the history
This makes it push the reports into a consistent location if CI_REPORTS is not set.
  • Loading branch information
mathie committed May 4, 2009
1 parent 8498d2c commit b5e57b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions acceptance/verification_spec.rb
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/ci/reporter/cucumber.rb
Expand Up @@ -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

Expand Down

0 comments on commit b5e57b6

Please sign in to comment.