ci_reporter 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +8 -0
- data/Manifest.txt +1 -0
- data/README.txt +5 -0
- data/Rakefile +2 -2
- data/lib/ci/reporter/rake/rspec.rb +2 -2
- data/lib/ci/reporter/rake/rspec_loader.rb +1 -6
- data/lib/ci/reporter/rake/test_unit_loader.rb +1 -6
- data/lib/ci/reporter/test_suite.rb +1 -1
- data/spec/ci/reporter/rspec_spec.rb +1 -0
- data/spec/ci/reporter/test_suite_spec.rb +8 -2
- data/stub.rake +13 -0
- metadata +3 -2
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
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
|
+
- Fix broken spec due to pending feature introduced in recent RSpec
|
6
|
+
- Fix compatibility for JRuby
|
7
|
+
- Add stub.rake file as another way to wrap existing Rakefile, with note in README
|
8
|
+
|
1
9
|
== 1.3.3
|
2
10
|
|
3
11
|
- Use SPEC_OPTS instead of RSPECOPTS (Aslak Hellesøy)
|
data/Manifest.txt
CHANGED
data/README.txt
CHANGED
@@ -33,6 +33,11 @@ Report files are written, by default, to the <code>test/reports</code> or <code>
|
|
33
33
|
|
34
34
|
== Advanced Usage
|
35
35
|
|
36
|
+
If you don't have control over the Rakefile or don't want to modify it, CI::Reporter has a substitute rake file that you can specify on the command-line. It assumes that the main project rake file is called +Rakefile+ and lives in the current directory. Run like so:
|
37
|
+
|
38
|
+
rake -f GEM_PATH/stub.rake ci:setup:testunit test
|
39
|
+
rake -f GEM_PATH/stub.rake ci:setup:rspec spec
|
40
|
+
|
36
41
|
If for some reason you can't use the above technique to inject CI::Reporter (e.g., you're not using Rake), you'll have to do one of these:
|
37
42
|
|
38
43
|
1. If you're using <code>Test::Unit</code>, ensure the <code>ci/reporter/rake/test_unit_loader.rb</code> file is loaded or required at some point before the tests are run.
|
data/Rakefile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'spec/rake/spectask'
|
2
2
|
|
3
3
|
MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt", "Rakefile",
|
4
|
-
"lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake"]
|
4
|
+
"*.rake", "lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake"]
|
5
5
|
|
6
6
|
begin
|
7
7
|
require 'hoe'
|
8
|
-
hoe = Hoe.new("ci_reporter", "1.3.
|
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"
|
@@ -7,8 +7,8 @@ namespace :ci do
|
|
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,10 +2,5 @@
|
|
2
2
|
# See the file LICENSE.txt included with the distribution for
|
3
3
|
# software license details.
|
4
4
|
|
5
|
-
|
6
|
-
begin
|
7
|
-
gem 'ci_reporter'
|
8
|
-
rescue => e
|
9
|
-
$: << File.dirname(__FILE__) + "/../../../lib"
|
10
|
-
end
|
5
|
+
$: << File.dirname(__FILE__) + "/../../../lib"
|
11
6
|
require 'ci/reporter/rspec'
|
@@ -2,12 +2,7 @@
|
|
2
2
|
# See the file LICENSE.txt included with the distribution for
|
3
3
|
# software license details.
|
4
4
|
|
5
|
-
|
6
|
-
begin
|
7
|
-
gem 'ci_reporter'
|
8
|
-
rescue
|
9
|
-
$: << File.dirname(__FILE__) + "/../../../lib"
|
10
|
-
end
|
5
|
+
$: << File.dirname(__FILE__) + "/../../../lib"
|
11
6
|
require 'ci/reporter/test_unit'
|
12
7
|
|
13
8
|
module Test #:nodoc:all
|
@@ -16,6 +16,7 @@ describe "The RSpec reporter" do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
@error.stub!(:expectation_not_met?).and_return(false)
|
19
|
+
@error.stub!(:pending_fixed?).and_return(false)
|
19
20
|
@report_mgr = mock("report manager")
|
20
21
|
@fmt = CI::Reporter::RSpec.new(StringIO.new(""), false, false, @report_mgr)
|
21
22
|
end
|
@@ -13,7 +13,7 @@ describe "A TestSuite" do
|
|
13
13
|
it "should collect timings when start and finish are invoked in sequence" do
|
14
14
|
@suite.start
|
15
15
|
@suite.finish
|
16
|
-
@suite.time.should
|
16
|
+
@suite.time.should >= 0
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should aggregate tests" do
|
@@ -22,6 +22,12 @@ describe "A TestSuite" do
|
|
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")
|
@@ -139,6 +145,6 @@ describe "A TestCase" do
|
|
139
145
|
it "should collect timings when start and finish are invoked in sequence" do
|
140
146
|
@tc.start
|
141
147
|
@tc.finish
|
142
|
-
@tc.time.should
|
148
|
+
@tc.time.should >= 0
|
143
149
|
end
|
144
150
|
end
|
data/stub.rake
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# (c) Copyright 2006-2007 Nick Sieger <nicksieger@gmail.com>
|
2
|
+
# See the file LICENSE.txt included with the distribution for
|
3
|
+
# software license details.
|
4
|
+
#
|
5
|
+
# Use this stub rakefile as a wrapper around a regular Rakefile. Run in the
|
6
|
+
# same directory as the real Rakefile.
|
7
|
+
#
|
8
|
+
# rake -f /path/to/ci_reporter/lib/ci/reporter/rake/stub.rake ci:setup:rspec default
|
9
|
+
#
|
10
|
+
|
11
|
+
load File.dirname(__FILE__) + '/lib/ci/reporter/rake/rspec.rb'
|
12
|
+
load File.dirname(__FILE__) + '/lib/ci/reporter/rake/test_unit.rb'
|
13
|
+
load 'Rakefile'
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ci_reporter
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.3.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.3.4
|
7
|
+
date: 2007-08-29 00:00:00 -05:00
|
8
8
|
summary: CI::Reporter allows you to generate reams of XML for use with continuous integration systems.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- README.txt
|
35
35
|
- LICENSE.txt
|
36
36
|
- Rakefile
|
37
|
+
- stub.rake
|
37
38
|
- lib/ci/reporter/core.rb
|
38
39
|
- lib/ci/reporter/rake/rspec.rb
|
39
40
|
- lib/ci/reporter/rake/rspec_loader.rb
|