Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit f4b7a3e3c63ac4d5b08b1bcbee49e1951bedb89a 1 parent a68606b
Nick Sieger nicksieger authored
5 History.txt
... ... @@ -1,3 +1,8 @@
  1 +== 1.3.4
  2 +
  3 +- Call #to_s on the object passed in as the test suite name; compatibility fix for RSpec
  4 + trunk which passes a Spec::DSL::Description instead of a string
  5 +
1 6 == 1.3.3
2 7
3 8 - Use SPEC_OPTS instead of RSPECOPTS (Aslak Hellesøy)
2  Rakefile
@@ -5,7 +5,7 @@ MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt",
5 5
6 6 begin
7 7 require 'hoe'
8   - hoe = Hoe.new("ci_reporter", "1.3.3") do |p|
  8 + hoe = Hoe.new("ci_reporter", "1.3.4") do |p|
9 9 p.rubyforge_name = "caldersphere"
10 10 p.url = "http://caldersphere.rubyforge.org/ci_reporter"
11 11 p.author = "Nick Sieger"
4 lib/ci/reporter/rake/rspec.rb
@@ -7,8 +7,8 @@
7 7 task :rspec do
8 8 rm_rf ENV["CI_REPORTS"] || "spec/reports"
9 9
10   - spec_opts = ["--require", "#{File.dirname(__FILE__)}/rspec_loader.rb",
11   - "--format", "CI::Reporter::RSpec"].join(" ")
  10 + spec_opts = ["--require", "#{File.dirname(__FILE__)}/rspec_loader.rb",
  11 + "--format", "CI::Reporter::RSpec"].join(" ")
12 12 ENV["SPEC_OPTS"] ||= ""
13 13 ENV["SPEC_OPTS"] += spec_opts
14 14 # Pre RSpec 1.0.6
2  lib/ci/reporter/test_suite.rb
@@ -40,7 +40,7 @@ class TestSuite < Struct.new(:name, :tests, :time, :failures, :errors, :assertio
40 40 attr_accessor :testcases
41 41 attr_accessor :stdout, :stderr
42 42 def initialize(name)
43   - super
  43 + super(name.to_s) # RSpec passes a "description" object instead of a string
44 44 @testcases = []
45 45 end
46 46
6 spec/ci/reporter/test_suite_spec.rb
@@ -22,6 +22,12 @@
22 22 @suite.finish
23 23 @suite.tests.should == 1
24 24 end
  25 +
  26 + it "should stringify the name for cases when the object passed in is not a string" do
  27 + name = Object.new
  28 + def name.to_s; "object name"; end
  29 + CI::Reporter::TestSuite.new(name).name.should == "object name"
  30 + end
25 31
26 32 it "should indicate number of failures and errors" do
27 33 failure = mock("failure")

0 comments on commit f4b7a3e

Please sign in to comment.
Something went wrong with that request. Please try again.