minitest 4.7.3 → 4.7.5
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 +22 -0
- data/lib/minitest/parallel_each.rb +6 -0
- data/lib/minitest/spec.rb +1 -2
- data/lib/minitest/unit.rb +15 -5
- data/test/minitest/test_minitest_mock.rb +16 -14
- data/test/minitest/test_minitest_unit.rb +4 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
=== 4.7.5 / 2013-06-21
|
2
|
+
|
3
|
+
* 2 bug fixes:
|
4
|
+
|
5
|
+
* Fix Spec#describe_stack to be thread local.
|
6
|
+
* Fix multithreaded test failures by defining Time local to mock test namespace
|
7
|
+
|
8
|
+
=== 4.7.4 / 2013-05-01
|
9
|
+
|
10
|
+
This is probably the last release of the 4.x series. It will be merged
|
11
|
+
to ruby and will be put into maintenance mode there.
|
12
|
+
|
13
|
+
I'm not set in stone on this, but at this point further development of
|
14
|
+
minitest (5+) will be gem-only. It is just too hard to work w/in
|
15
|
+
ruby-core w/ test-unit compatibility holding minitest development
|
16
|
+
back.
|
17
|
+
|
18
|
+
* 2 minor enhancements:
|
19
|
+
|
20
|
+
* Added count/size to ParallelEach to fix use w/in stdlib's test/unit. :( (btaitelb)
|
21
|
+
* Allow disabling of info_signal handler in runner. (erikh)
|
22
|
+
|
1
23
|
=== 4.7.3 / 2013-04-20
|
2
24
|
|
3
25
|
* 1 bug fix:
|
data/lib/minitest/spec.rb
CHANGED
data/lib/minitest/unit.rb
CHANGED
@@ -731,7 +731,7 @@ module MiniTest
|
|
731
731
|
end
|
732
732
|
|
733
733
|
class Unit # :nodoc:
|
734
|
-
VERSION = "4.7.
|
734
|
+
VERSION = "4.7.5" # :nodoc:
|
735
735
|
|
736
736
|
attr_accessor :report, :failures, :errors, :skips # :nodoc:
|
737
737
|
attr_accessor :assertion_count # :nodoc:
|
@@ -741,6 +741,17 @@ module MiniTest
|
|
741
741
|
attr_accessor :verbose # :nodoc:
|
742
742
|
attr_writer :options # :nodoc:
|
743
743
|
|
744
|
+
##
|
745
|
+
# :attr:
|
746
|
+
#
|
747
|
+
# if true, installs an "INFO" signal handler (only available to BSD and
|
748
|
+
# OS X users) which prints diagnostic information about the test run.
|
749
|
+
#
|
750
|
+
# This is auto-detected by default but may be overridden by custom
|
751
|
+
# runners.
|
752
|
+
|
753
|
+
attr_accessor :info_signal
|
754
|
+
|
744
755
|
##
|
745
756
|
# Lazy accessor for options.
|
746
757
|
|
@@ -987,6 +998,7 @@ module MiniTest
|
|
987
998
|
@errors = @failures = @skips = 0
|
988
999
|
@verbose = false
|
989
1000
|
@mutex = defined?(Mutex) ? Mutex.new : nil
|
1001
|
+
@info_signal = Signal.list['INFO']
|
990
1002
|
end
|
991
1003
|
|
992
1004
|
def synchronize # :nodoc:
|
@@ -1221,8 +1233,6 @@ module MiniTest
|
|
1221
1233
|
PASSTHROUGH_EXCEPTIONS = [NoMemoryError, SignalException,
|
1222
1234
|
Interrupt, SystemExit] # :nodoc:
|
1223
1235
|
|
1224
|
-
SUPPORTS_INFO_SIGNAL = Signal.list['INFO'] # :nodoc:
|
1225
|
-
|
1226
1236
|
##
|
1227
1237
|
# Runs the tests reporting the status to +runner+
|
1228
1238
|
|
@@ -1235,7 +1245,7 @@ module MiniTest
|
|
1235
1245
|
time = runner.start_time ? Time.now - runner.start_time : 0
|
1236
1246
|
warn "Current Test: %s#%s %.2fs" % [self.class, self.__name__, time]
|
1237
1247
|
runner.status $stderr
|
1238
|
-
end if
|
1248
|
+
end if runner.info_signal
|
1239
1249
|
|
1240
1250
|
start_time = Time.now
|
1241
1251
|
|
@@ -1269,7 +1279,7 @@ module MiniTest
|
|
1269
1279
|
result = runner.puke self.class, self.__name__, e
|
1270
1280
|
end
|
1271
1281
|
end
|
1272
|
-
trap 'INFO', 'DEFAULT' if
|
1282
|
+
trap 'INFO', 'DEFAULT' if runner.info_signal
|
1273
1283
|
end
|
1274
1284
|
result
|
1275
1285
|
end
|
@@ -286,18 +286,22 @@ class TestMiniTestStub < MiniTest::Unit::TestCase
|
|
286
286
|
assert_equal @assertion_count, @tc._assertions
|
287
287
|
end
|
288
288
|
|
289
|
+
class Time
|
290
|
+
def self.now
|
291
|
+
24
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
289
295
|
def assert_stub val_or_callable
|
290
296
|
@assertion_count += 1
|
291
297
|
|
292
|
-
|
293
|
-
t = Time.now.to_i
|
294
|
-
|
295
|
-
Time.stub :now, val_or_callable do
|
296
|
-
@tc.assert_equal 42, Time.now
|
297
|
-
end
|
298
|
+
t = Time.now.to_i
|
298
299
|
|
299
|
-
|
300
|
+
Time.stub :now, val_or_callable do
|
301
|
+
@tc.assert_equal 42, Time.now
|
300
302
|
end
|
303
|
+
|
304
|
+
@tc.assert_operator Time.now.to_i, :>=, t
|
301
305
|
end
|
302
306
|
|
303
307
|
def test_stub_private_module_method
|
@@ -345,15 +349,13 @@ class TestMiniTestStub < MiniTest::Unit::TestCase
|
|
345
349
|
def test_stub_block_args
|
346
350
|
@assertion_count += 1
|
347
351
|
|
348
|
-
|
349
|
-
t = Time.now.to_i
|
350
|
-
|
351
|
-
Time.stub :now, lambda { |n| n * 2 } do
|
352
|
-
@tc.assert_equal 42, Time.now(21)
|
353
|
-
end
|
352
|
+
t = Time.now.to_i
|
354
353
|
|
355
|
-
|
354
|
+
Time.stub :now, lambda { |n| n * 2 } do
|
355
|
+
@tc.assert_equal 42, Time.now(21)
|
356
356
|
end
|
357
|
+
|
358
|
+
@tc.assert_operator Time.now.to_i, :>=, t
|
357
359
|
end
|
358
360
|
|
359
361
|
def test_stub_callable
|
@@ -557,6 +557,10 @@ class TestMiniTestRunner < MetaMetaMetaTestCase
|
|
557
557
|
end
|
558
558
|
end
|
559
559
|
|
560
|
+
def test_parallel_each_size
|
561
|
+
assert_equal 0, ParallelEach.new([]).size
|
562
|
+
end
|
563
|
+
|
560
564
|
def test_run_parallel
|
561
565
|
skip "I don't have ParallelEach debugged yet" if maglev?
|
562
566
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 41
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 4
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 4.7.
|
9
|
+
- 5
|
10
|
+
version: 4.7.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2013-
|
39
|
+
date: 2013-06-22 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rdoc
|
metadata.gz.sig
CHANGED
Binary file
|