Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
Add three acceptance tests for Test::Unit, and one TODO for RSpec
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.caldersphere.net/svn/main/rubyforge/ci_reporter/trunk@176 b03c2d0b-2f10-0410-a2f9-fc8001506dfa
  • Loading branch information
nicksieger committed Nov 22, 2007
1 parent 6da80dc commit 930f7d6
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion acceptance/verification_spec.rb
@@ -1,7 +1,40 @@
require 'rexml/document'

REPORTS_DIR = File.dirname(__FILE__) + '/reports'

describe "Test::Unit acceptance" do
it "should generate two XML files" do
violated "to complete"
File.exist?(File.join(REPORTS_DIR, 'TEST-TestUnitExampleTestOne.xml')).should == true
File.exist?(File.join(REPORTS_DIR, 'TEST-TestUnitExampleTestTwo.xml')).should == true
end

it "should have one error and one failure for TestUnitExampleTestOne" do
doc = File.open(File.join(REPORTS_DIR, 'TEST-TestUnitExampleTestOne.xml')) do |f|
REXML::Document.new(f)
end
doc.root.attributes["errors"].should == "1"
doc.root.attributes["failures"].should == "1"
doc.root.attributes["assertions"].should == "1"
doc.root.attributes["tests"].should == "1"
failures = doc.root.elements.to_a("/testsuite/testcase/failure")
failures.size.should == 2
end

it "should have no errors or failures for TestUnitExampleTestTwo" do
doc = File.open(File.join(REPORTS_DIR, 'TEST-TestUnitExampleTestTwo.xml')) do |f|
REXML::Document.new(f)
end
doc.root.attributes["errors"].should == "0"
doc.root.attributes["failures"].should == "0"
doc.root.attributes["assertions"].should == "1"
doc.root.attributes["tests"].should == "1"
failures = doc.root.elements.to_a("/testsuite/testcase/failure")
failures.size.should == 0
end
end

describe "RSpec acceptance" do
it "should generate one XML file" do
violated "TODO"
end
end

0 comments on commit 930f7d6

Please sign in to comment.