Permalink
Browse files

Prep for 1.3.4 release; RSpec compatibility fix

git-svn-id: http://svn.caldersphere.net/svn/main/rubyforge/ci_reporter/trunk@103 b03c2d0b-2f10-0410-a2f9-fc8001506dfa
  • Loading branch information...
1 parent a68606b commit f4b7a3e3c63ac4d5b08b1bcbee49e1951bedb89a @nicksieger nicksieger committed Jul 26, 2007
Showing with 15 additions and 4 deletions.
  1. +5 −0 History.txt
  2. +1 −1 Rakefile
  3. +2 −2 lib/ci/reporter/rake/rspec.rb
  4. +1 −1 lib/ci/reporter/test_suite.rb
  5. +6 −0 spec/ci/reporter/test_suite_spec.rb
View
5 History.txt
@@ -1,3 +1,8 @@
+== 1.3.4
+
+- Call #to_s on the object passed in as the test suite name; compatibility fix for RSpec
+ trunk which passes a Spec::DSL::Description instead of a string
+
== 1.3.3
- Use SPEC_OPTS instead of RSPECOPTS (Aslak Hellesøy)
View
2 Rakefile
@@ -5,7 +5,7 @@ MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt",
begin
require 'hoe'
- hoe = Hoe.new("ci_reporter", "1.3.3") do |p|
+ hoe = Hoe.new("ci_reporter", "1.3.4") do |p|
p.rubyforge_name = "caldersphere"
p.url = "http://caldersphere.rubyforge.org/ci_reporter"
p.author = "Nick Sieger"
View
4 lib/ci/reporter/rake/rspec.rb
@@ -7,8 +7,8 @@
task :rspec do
rm_rf ENV["CI_REPORTS"] || "spec/reports"
- spec_opts = ["--require", "#{File.dirname(__FILE__)}/rspec_loader.rb",
- "--format", "CI::Reporter::RSpec"].join(" ")
+ spec_opts = ["--require", "#{File.dirname(__FILE__)}/rspec_loader.rb",
+ "--format", "CI::Reporter::RSpec"].join(" ")
ENV["SPEC_OPTS"] ||= ""
ENV["SPEC_OPTS"] += spec_opts
# Pre RSpec 1.0.6
View
2 lib/ci/reporter/test_suite.rb
@@ -40,7 +40,7 @@ class TestSuite < Struct.new(:name, :tests, :time, :failures, :errors, :assertio
attr_accessor :testcases
attr_accessor :stdout, :stderr
def initialize(name)
- super
+ super(name.to_s) # RSpec passes a "description" object instead of a string
@testcases = []
end
View
6 spec/ci/reporter/test_suite_spec.rb
@@ -22,6 +22,12 @@
@suite.finish
@suite.tests.should == 1
end
+
+ it "should stringify the name for cases when the object passed in is not a string" do
+ name = Object.new
+ def name.to_s; "object name"; end
+ CI::Reporter::TestSuite.new(name).name.should == "object name"
+ end
it "should indicate number of failures and errors" do
failure = mock("failure")

0 comments on commit f4b7a3e

Please sign in to comment.