minitest_tu_shim 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +7 -0
- data/Rakefile +1 -1
- data/lib/test/unit/testcase.rb +1 -1
- data/test/test_mini_test.rb +55 -37
- metadata +43 -14
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/lib/test/unit/testcase.rb
CHANGED
data/test/test_mini_test.rb
CHANGED
@@ -103,7 +103,7 @@ class TestMiniTest < MiniTest::Unit::TestCase
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def test_class_run_test_suites
|
106
|
-
tc = Class.new
|
106
|
+
tc = Class.new MiniTest::Unit::TestCase do
|
107
107
|
def test_something
|
108
108
|
assert true
|
109
109
|
end
|
@@ -115,7 +115,11 @@ class TestMiniTest < MiniTest::Unit::TestCase
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def test_run_failing # TODO: add error test
|
118
|
-
tc = Class.new
|
118
|
+
tc = Class.new MiniTest::Unit::TestCase do
|
119
|
+
def self.test_order
|
120
|
+
:alpha
|
121
|
+
end
|
122
|
+
|
119
123
|
def test_something
|
120
124
|
assert true
|
121
125
|
end
|
@@ -139,12 +143,18 @@ test_failure(ATestCase) [FILE:LINE]:
|
|
139
143
|
Failed assertion, no message given.
|
140
144
|
|
141
145
|
2 tests, 2 assertions, 1 failures, 0 errors, 0 skips
|
146
|
+
|
147
|
+
Test run options:
|
142
148
|
"
|
143
149
|
util_assert_report expected
|
144
150
|
end
|
145
151
|
|
146
152
|
def test_run_error
|
147
|
-
tc = Class.new
|
153
|
+
tc = Class.new MiniTest::Unit::TestCase do
|
154
|
+
def self.test_order
|
155
|
+
:alpha
|
156
|
+
end
|
157
|
+
|
148
158
|
def test_something
|
149
159
|
assert true
|
150
160
|
end
|
@@ -169,12 +179,14 @@ RuntimeError: unhandled exception
|
|
169
179
|
FILE:LINE:in `test_error'
|
170
180
|
|
171
181
|
2 tests, 1 assertions, 0 failures, 1 errors, 0 skips
|
182
|
+
|
183
|
+
Test run options:
|
172
184
|
"
|
173
185
|
util_assert_report expected
|
174
186
|
end
|
175
187
|
|
176
188
|
def test_run_error_teardown
|
177
|
-
tc = Class.new
|
189
|
+
tc = Class.new MiniTest::Unit::TestCase do
|
178
190
|
def test_something
|
179
191
|
assert true
|
180
192
|
end
|
@@ -199,12 +211,18 @@ RuntimeError: unhandled exception
|
|
199
211
|
FILE:LINE:in `teardown'
|
200
212
|
|
201
213
|
1 tests, 1 assertions, 0 failures, 1 errors, 0 skips
|
214
|
+
|
215
|
+
Test run options:
|
202
216
|
"
|
203
217
|
util_assert_report expected
|
204
218
|
end
|
205
219
|
|
206
220
|
def test_run_skip
|
207
|
-
tc = Class.new
|
221
|
+
tc = Class.new MiniTest::Unit::TestCase do
|
222
|
+
def self.test_order
|
223
|
+
:alpha
|
224
|
+
end
|
225
|
+
|
208
226
|
def test_something
|
209
227
|
assert true
|
210
228
|
end
|
@@ -228,6 +246,8 @@ test_skip(ATestCase) [FILE:LINE]:
|
|
228
246
|
not yet
|
229
247
|
|
230
248
|
2 tests, 1 assertions, 0 failures, 0 errors, 1 skips
|
249
|
+
|
250
|
+
Test run options:
|
231
251
|
"
|
232
252
|
util_assert_report expected
|
233
253
|
end
|
@@ -239,15 +259,22 @@ Started
|
|
239
259
|
Finished in 0.00
|
240
260
|
|
241
261
|
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
|
262
|
+
|
263
|
+
Test run options:
|
242
264
|
"
|
243
265
|
output = @output.string.sub(/Finished in .*/, "Finished in 0.00")
|
244
266
|
output.sub!(/Loaded suite .*/, 'Loaded suite blah')
|
245
267
|
output.sub!(/[\w\/\.]+:\d+/, 'FILE:LINE')
|
268
|
+
output.gsub!(/(Test run options:).+/, '\1')
|
246
269
|
assert_equal(expected, output)
|
247
270
|
end
|
248
271
|
|
249
272
|
def test_run_failing_filtered
|
250
|
-
tc = Class.new
|
273
|
+
tc = Class.new MiniTest::Unit::TestCase do
|
274
|
+
def self.test_order
|
275
|
+
:alpha
|
276
|
+
end
|
277
|
+
|
251
278
|
def test_something
|
252
279
|
assert true
|
253
280
|
end
|
@@ -265,7 +292,7 @@ Finished in 0.00
|
|
265
292
|
end
|
266
293
|
|
267
294
|
def test_run_passing
|
268
|
-
tc = Class.new
|
295
|
+
tc = Class.new MiniTest::Unit::TestCase do
|
269
296
|
def test_something
|
270
297
|
assert true
|
271
298
|
end
|
@@ -297,18 +324,18 @@ class TestMiniTestTestCase < MiniTest::Unit::TestCase
|
|
297
324
|
def test_class_inherited
|
298
325
|
@assertion_count = 0
|
299
326
|
|
300
|
-
|
327
|
+
testcase = Class.new MiniTest::Unit::TestCase
|
301
328
|
|
302
|
-
assert_equal [
|
329
|
+
assert_equal [testcase], MiniTest::Unit::TestCase.test_suites
|
303
330
|
end
|
304
331
|
|
305
332
|
def test_class_test_suites
|
306
333
|
@assertion_count = 0
|
307
334
|
|
308
|
-
|
335
|
+
testcase = Class.new MiniTest::Unit::TestCase
|
309
336
|
|
310
337
|
assert_equal 1, MiniTest::Unit::TestCase.test_suites.size
|
311
|
-
assert_equal [
|
338
|
+
assert_equal [testcase], MiniTest::Unit::TestCase.test_suites
|
312
339
|
end
|
313
340
|
|
314
341
|
def test_class_asserts_match_refutes
|
@@ -538,16 +565,16 @@ Expected [RuntimeError] to include SyntaxError."
|
|
538
565
|
end
|
539
566
|
|
540
567
|
def test_assert_same_triggered
|
541
|
-
|
542
|
-
|
543
|
-
util_assert_triggered 'Expected 2 (0xXXX) to be the same as 1 (0xXXX).' do
|
568
|
+
util_assert_triggered 'Expected 2 (oid=N) to be the same as 1 (oid=N).' do
|
544
569
|
@tc.assert_same 1, 2
|
545
570
|
end
|
571
|
+
end
|
546
572
|
|
573
|
+
def test_assert_same_equal_triggered
|
547
574
|
s1 = "blah"
|
548
575
|
s2 = "blah"
|
549
576
|
|
550
|
-
util_assert_triggered 'Expected "blah" (
|
577
|
+
util_assert_triggered 'Expected "blah" (oid=N) to be the same as "blah" (oid=N).' do
|
551
578
|
@tc.assert_same s1, s2
|
552
579
|
end
|
553
580
|
end
|
@@ -623,16 +650,11 @@ Expected [RuntimeError] to include SyntaxError."
|
|
623
650
|
def test_test_methods_sorted
|
624
651
|
@assertion_count = 0
|
625
652
|
|
626
|
-
sample_test_case = Class.new
|
627
|
-
|
628
|
-
|
629
|
-
def
|
630
|
-
|
631
|
-
|
632
|
-
sample_test_case.instance_eval do
|
633
|
-
define_method :test_test3 do assert "does not matter" end
|
634
|
-
define_method :test_test2 do assert "does not matter" end
|
635
|
-
define_method :test_test1 do assert "does not matter" end
|
653
|
+
sample_test_case = Class.new MiniTest::Unit::TestCase do
|
654
|
+
def self.test_order; :sorted; end
|
655
|
+
def test_test3; assert "does not matter" end
|
656
|
+
def test_test2; assert "does not matter" end
|
657
|
+
def test_test1; assert "does not matter" end
|
636
658
|
end
|
637
659
|
|
638
660
|
expected = %w(test_test1 test_test2 test_test3)
|
@@ -642,16 +664,11 @@ Expected [RuntimeError] to include SyntaxError."
|
|
642
664
|
def test_test_methods_random
|
643
665
|
@assertion_count = 0
|
644
666
|
|
645
|
-
sample_test_case = Class.new
|
646
|
-
|
647
|
-
|
648
|
-
def
|
649
|
-
|
650
|
-
|
651
|
-
sample_test_case.instance_eval do
|
652
|
-
define_method :test_test1 do assert "does not matter" end
|
653
|
-
define_method :test_test2 do assert "does not matter" end
|
654
|
-
define_method :test_test3 do assert "does not matter" end
|
667
|
+
sample_test_case = Class.new MiniTest::Unit::TestCase do
|
668
|
+
def self.test_order; :random end
|
669
|
+
def test_test1; assert "does not matter" end
|
670
|
+
def test_test2; assert "does not matter" end
|
671
|
+
def test_test3; assert "does not matter" end
|
655
672
|
end
|
656
673
|
|
657
674
|
srand 42
|
@@ -803,7 +820,7 @@ Expected [RuntimeError] to include SyntaxError."
|
|
803
820
|
|
804
821
|
# TODO: "with id <id>" crap from assertions.rb
|
805
822
|
def test_refute_same_triggered
|
806
|
-
util_assert_triggered 'Expected 1 to not be the same as 1.' do
|
823
|
+
util_assert_triggered 'Expected 1 (oid=N) to not be the same as 1 (oid=N).' do
|
807
824
|
@tc.refute_same 1, 1
|
808
825
|
end
|
809
826
|
end
|
@@ -822,7 +839,8 @@ Expected [RuntimeError] to include SyntaxError."
|
|
822
839
|
end
|
823
840
|
|
824
841
|
msg = e.message.sub(/(---Backtrace---).*/m, '\1')
|
825
|
-
msg.gsub!(/\(
|
842
|
+
msg.gsub!(/\(oid=[-0-9]+\)/, '(oid=N)')
|
843
|
+
msg.gsub!(/(Test run options:).+/, '\1')
|
826
844
|
|
827
845
|
assert_equal expected, msg
|
828
846
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest_tu_shim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 3
|
8
|
+
- 2
|
9
|
+
version: 1.3.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Ryan Davis
|
@@ -30,29 +35,51 @@ cert_chain:
|
|
30
35
|
FBHgymkyj/AOSqKRIpXPhjC6
|
31
36
|
-----END CERTIFICATE-----
|
32
37
|
|
33
|
-
date:
|
38
|
+
date: 2010-03-27 00:00:00 -07:00
|
34
39
|
default_executable:
|
35
40
|
dependencies:
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: minitest
|
43
|
+
prerelease: false
|
44
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
segments:
|
49
|
+
- 1
|
50
|
+
- 6
|
51
|
+
- 0
|
52
|
+
version: 1.6.0
|
38
53
|
type: :runtime
|
39
|
-
|
40
|
-
|
54
|
+
version_requirements: *id001
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubyforge
|
57
|
+
prerelease: false
|
58
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
59
|
requirements:
|
42
60
|
- - ">="
|
43
61
|
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
62
|
+
segments:
|
63
|
+
- 2
|
64
|
+
- 0
|
65
|
+
- 3
|
66
|
+
version: 2.0.3
|
67
|
+
type: :development
|
68
|
+
version_requirements: *id002
|
46
69
|
- !ruby/object:Gem::Dependency
|
47
70
|
name: hoe
|
48
|
-
|
49
|
-
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
51
73
|
requirements:
|
52
74
|
- - ">="
|
53
75
|
- !ruby/object:Gem::Version
|
54
|
-
|
55
|
-
|
76
|
+
segments:
|
77
|
+
- 2
|
78
|
+
- 6
|
79
|
+
- 0
|
80
|
+
version: 2.6.0
|
81
|
+
type: :development
|
82
|
+
version_requirements: *id003
|
56
83
|
description: |-
|
57
84
|
minitest_tu_shim bridges the gap between the small and fast minitest
|
58
85
|
and ruby's huge and slow test/unit.
|
@@ -93,18 +120,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
120
|
requirements:
|
94
121
|
- - ">="
|
95
122
|
- !ruby/object:Gem::Version
|
123
|
+
segments:
|
124
|
+
- 0
|
96
125
|
version: "0"
|
97
|
-
version:
|
98
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
127
|
requirements:
|
100
128
|
- - ">="
|
101
129
|
- !ruby/object:Gem::Version
|
130
|
+
segments:
|
131
|
+
- 0
|
102
132
|
version: "0"
|
103
|
-
version:
|
104
133
|
requirements: []
|
105
134
|
|
106
135
|
rubyforge_project: bfts
|
107
|
-
rubygems_version: 1.3.
|
136
|
+
rubygems_version: 1.3.6
|
108
137
|
signing_key:
|
109
138
|
specification_version: 3
|
110
139
|
summary: minitest_tu_shim bridges the gap between the small and fast minitest and ruby's huge and slow test/unit.
|
metadata.gz.sig
CHANGED
Binary file
|