ci_reporter 1.9.3 → 2.0.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +22 -0
- data/.travis.yml +2 -6
- data/Gemfile +0 -9
- data/History.txt +0 -4
- data/LICENSE.txt +23 -21
- data/README.md +90 -0
- data/Rakefile +5 -99
- data/ci_reporter.gemspec +23 -52
- data/gemfiles/.gitignore +1 -0
- data/lib/ci/reporter/core.rb +0 -4
- data/lib/ci/reporter/internal.rb +31 -0
- data/lib/ci/reporter/rake/utils.rb +0 -4
- data/lib/ci/reporter/report_manager.rb +7 -11
- data/lib/ci/reporter/test_suite.rb +1 -9
- data/lib/ci/reporter/version.rb +1 -7
- data/spec/ci/reporter/output_capture_spec.rb +3 -7
- data/spec/ci/reporter/report_manager_spec.rb +6 -10
- data/spec/ci/reporter/test_suite_spec.rb +0 -4
- data/spec/spec_helper.rb +0 -7
- metadata +29 -138
- data/.gemtest +0 -0
- data/.hoerc +0 -2
- data/.travis.before_install.sh +0 -13
- data/Manifest.txt +0 -50
- data/README.rdoc +0 -111
- data/acceptance/cucumber/cucumber_example.feature +0 -19
- data/acceptance/cucumber/step_definitions/development_steps.rb +0 -40
- data/acceptance/minitest_example_test.rb +0 -17
- data/acceptance/rspec_example_spec.rb +0 -24
- data/acceptance/spinach/features/spinach_example.feature +0 -24
- data/acceptance/spinach/features/steps/example_spinach_feature.rb +0 -34
- data/acceptance/test_unit_example_test.rb +0 -23
- data/acceptance/verification_spec.rb +0 -185
- data/lib/ci/reporter/cucumber.rb +0 -127
- data/lib/ci/reporter/minitest.rb +0 -226
- data/lib/ci/reporter/rake/cucumber.rb +0 -17
- data/lib/ci/reporter/rake/cucumber_loader.rb +0 -6
- data/lib/ci/reporter/rake/minitest.rb +0 -15
- data/lib/ci/reporter/rake/minitest_loader.rb +0 -9
- data/lib/ci/reporter/rake/rspec.rb +0 -31
- data/lib/ci/reporter/rake/rspec_loader.rb +0 -6
- data/lib/ci/reporter/rake/spinach.rb +0 -19
- data/lib/ci/reporter/rake/spinach_loader.rb +0 -5
- data/lib/ci/reporter/rake/test_unit.rb +0 -15
- data/lib/ci/reporter/rake/test_unit_loader.rb +0 -38
- data/lib/ci/reporter/rspec.rb +0 -220
- data/lib/ci/reporter/spinach.rb +0 -80
- data/lib/ci/reporter/test_unit.rb +0 -163
- data/spec/ci/reporter/cucumber_spec.rb +0 -230
- data/spec/ci/reporter/rake/rake_tasks_spec.rb +0 -110
- data/spec/ci/reporter/rspec_spec.rb +0 -156
- data/spec/ci/reporter/test_unit_spec.rb +0 -152
- data/stub.rake +0 -16
- data/tasks/ci_reporter.rake +0 -20
@@ -1,152 +0,0 @@
|
|
1
|
-
# Copyright (c) 2006-2013 Nick Sieger <nicksieger@gmail.com>
|
2
|
-
# See the file LICENSE.txt included with the distribution for
|
3
|
-
# software license details.
|
4
|
-
|
5
|
-
require File.dirname(__FILE__) + "/../../spec_helper.rb"
|
6
|
-
|
7
|
-
describe "The TestUnit reporter" do
|
8
|
-
before(:each) do
|
9
|
-
@report_mgr = double("report manager")
|
10
|
-
@testunit = CI::Reporter::TestUnit.new(nil, @report_mgr)
|
11
|
-
@result = double("result")
|
12
|
-
@result.stub(:assertion_count).and_return(7)
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should build suites based on adjacent tests with the same class name" do
|
16
|
-
@suite = nil
|
17
|
-
@report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite }
|
18
|
-
|
19
|
-
@testunit.started(@result)
|
20
|
-
@testunit.test_started("test_one(TestCaseClass)")
|
21
|
-
@testunit.test_finished("test_one(TestCaseClass)")
|
22
|
-
@testunit.test_started("test_two(TestCaseClass)")
|
23
|
-
@testunit.test_finished("test_two(TestCaseClass)")
|
24
|
-
@testunit.finished(10)
|
25
|
-
|
26
|
-
@suite.name.should == "TestCaseClass"
|
27
|
-
@suite.testcases.length.should == 2
|
28
|
-
@suite.testcases.first.name.should == "test_one"
|
29
|
-
@suite.testcases.first.should_not be_failure
|
30
|
-
@suite.testcases.first.should_not be_error
|
31
|
-
@suite.testcases.last.name.should == "test_two"
|
32
|
-
@suite.testcases.last.should_not be_failure
|
33
|
-
@suite.testcases.last.should_not be_error
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should build two suites when encountering different class names" do
|
37
|
-
@suites = []
|
38
|
-
@report_mgr.should_receive(:write_report).twice.and_return {|suite| @suites << suite }
|
39
|
-
|
40
|
-
@testunit.started(@result)
|
41
|
-
@testunit.test_started("test_one(TestCaseClass)")
|
42
|
-
@testunit.test_finished("test_one(TestCaseClass)")
|
43
|
-
@testunit.test_started("test_two(AnotherTestCaseClass)")
|
44
|
-
@testunit.test_finished("test_two(AnotherTestCaseClass)")
|
45
|
-
@testunit.finished(10)
|
46
|
-
|
47
|
-
@suites.first.name.should == "TestCaseClass"
|
48
|
-
@suites.first.testcases.length.should == 1
|
49
|
-
@suites.first.testcases.first.name.should == "test_one"
|
50
|
-
@suites.first.testcases.first.assertions.should == 7
|
51
|
-
|
52
|
-
@suites.last.name.should == "AnotherTestCaseClass"
|
53
|
-
@suites.last.testcases.length.should == 1
|
54
|
-
@suites.last.testcases.first.name.should == "test_two"
|
55
|
-
@suites.last.testcases.first.assertions.should == 0
|
56
|
-
end
|
57
|
-
|
58
|
-
it "should record assertion counts during test run" do
|
59
|
-
@suite = nil
|
60
|
-
@report_mgr.should_receive(:write_report).and_return {|suite| @suite = suite }
|
61
|
-
|
62
|
-
@testunit.started(@result)
|
63
|
-
@testunit.test_started("test_one(TestCaseClass)")
|
64
|
-
@testunit.test_finished("test_one(TestCaseClass)")
|
65
|
-
@testunit.finished(10)
|
66
|
-
|
67
|
-
@suite.assertions.should == 7
|
68
|
-
@suite.testcases.last.assertions.should == 7
|
69
|
-
end
|
70
|
-
|
71
|
-
it "should add failures to testcases when encountering a fault" do
|
72
|
-
@failure = Test::Unit::Failure.new("test_one(TestCaseClass)", "somewhere:10", "it failed")
|
73
|
-
|
74
|
-
@suite = nil
|
75
|
-
@report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite }
|
76
|
-
|
77
|
-
@testunit.started(@result)
|
78
|
-
@testunit.test_started("test_one(TestCaseClass)")
|
79
|
-
@testunit.fault(@failure)
|
80
|
-
@testunit.test_finished("test_one(TestCaseClass)")
|
81
|
-
@testunit.finished(10)
|
82
|
-
|
83
|
-
@suite.name.should == "TestCaseClass"
|
84
|
-
@suite.testcases.length.should == 1
|
85
|
-
@suite.testcases.first.name.should == "test_one"
|
86
|
-
@suite.testcases.first.should be_failure
|
87
|
-
end
|
88
|
-
|
89
|
-
it "should add errors to testcases when encountering a fault" do
|
90
|
-
begin
|
91
|
-
raise StandardError, "error"
|
92
|
-
rescue => e
|
93
|
-
@error = Test::Unit::Error.new("test_two(TestCaseClass)", e)
|
94
|
-
end
|
95
|
-
|
96
|
-
@suite = nil
|
97
|
-
@report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite }
|
98
|
-
|
99
|
-
@testunit.started(@result)
|
100
|
-
@testunit.test_started("test_one(TestCaseClass)")
|
101
|
-
@testunit.test_finished("test_one(TestCaseClass)")
|
102
|
-
@testunit.test_started("test_two(TestCaseClass)")
|
103
|
-
@testunit.fault(@error)
|
104
|
-
@testunit.test_finished("test_two(TestCaseClass)")
|
105
|
-
@testunit.finished(10)
|
106
|
-
|
107
|
-
@suite.name.should == "TestCaseClass"
|
108
|
-
@suite.testcases.length.should == 2
|
109
|
-
@suite.testcases.first.name.should == "test_one"
|
110
|
-
@suite.testcases.first.should_not be_failure
|
111
|
-
@suite.testcases.first.should_not be_error
|
112
|
-
@suite.testcases.last.name.should == "test_two"
|
113
|
-
@suite.testcases.last.should_not be_failure
|
114
|
-
@suite.testcases.last.should be_error
|
115
|
-
end
|
116
|
-
|
117
|
-
it "should add multiple failures to a testcase" do
|
118
|
-
@failure1 = Test::Unit::Failure.new("test_one(TestCaseClass)", "somewhere:10", "it failed")
|
119
|
-
@failure2 = Test::Unit::Failure.new("test_one(TestCaseClass)", "somewhere:12", "it failed again in teardown")
|
120
|
-
|
121
|
-
@suite = nil
|
122
|
-
@report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite }
|
123
|
-
|
124
|
-
@testunit.started(@result)
|
125
|
-
@testunit.test_started("test_one(TestCaseClass)")
|
126
|
-
@testunit.fault(@failure1)
|
127
|
-
@testunit.fault(@failure2)
|
128
|
-
@testunit.test_finished("test_one(TestCaseClass)")
|
129
|
-
@testunit.finished(10)
|
130
|
-
|
131
|
-
@suite.name.should == "TestCaseClass"
|
132
|
-
@suite.testcases.length.should == 1
|
133
|
-
@suite.testcases.first.name.should == "test_one"
|
134
|
-
@suite.testcases.first.should be_failure
|
135
|
-
@suite.testcases.first.failures.size.should == 2
|
136
|
-
@suite.failures.should == 2
|
137
|
-
end
|
138
|
-
|
139
|
-
it "should count test case names that don't conform to the standard pattern" do
|
140
|
-
@suite = nil
|
141
|
-
@report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite }
|
142
|
-
|
143
|
-
@testunit.started(@result)
|
144
|
-
@testunit.test_started("some unknown test")
|
145
|
-
@testunit.test_finished("some unknown test")
|
146
|
-
@testunit.finished(10)
|
147
|
-
|
148
|
-
@suite.name.should == "unknown-1"
|
149
|
-
@suite.testcases.length.should == 1
|
150
|
-
@suite.testcases.first.name.should == "some unknown test"
|
151
|
-
end
|
152
|
-
end
|
data/stub.rake
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# Copyright (c) 2006-2012 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/cucumber.rb'
|
13
|
-
load File.dirname(__FILE__) + '/lib/ci/reporter/rake/test_unit.rb'
|
14
|
-
load File.dirname(__FILE__) + '/lib/ci/reporter/rake/minitest.rb'
|
15
|
-
load File.dirname(__FILE__) + '/lib/ci/reporter/rake/spinach.rb'
|
16
|
-
load 'Rakefile'
|
data/tasks/ci_reporter.rake
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# Copyright (c) 2006-2012 Nick Sieger <nicksieger@gmail.com>
|
2
|
-
# See the file LICENSE.txt included with the distribution for
|
3
|
-
# software license details.
|
4
|
-
|
5
|
-
begin
|
6
|
-
gem 'ci_reporter'
|
7
|
-
rescue Gem::LoadError
|
8
|
-
$: << File.dirname(__FILE__) + "/../lib"
|
9
|
-
end
|
10
|
-
require 'ci/reporter/rake/rspec'
|
11
|
-
require 'ci/reporter/rake/cucumber'
|
12
|
-
require 'ci/reporter/rake/test_unit'
|
13
|
-
require 'ci/reporter/rake/minitest'
|
14
|
-
|
15
|
-
namespace :ci do
|
16
|
-
task :setup_rspec => "ci:setup:rspec"
|
17
|
-
task :setup_cucumber => "ci:setup:cucumber"
|
18
|
-
task :setup_testunit => "ci:setup:testunit"
|
19
|
-
task :setup_minitest => "ci:setup:minitest"
|
20
|
-
end
|