minitest 4.7.3 → 4.7.4

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,18 @@
1
+ === 4.7.4 / 2013-05-01
2
+
3
+ This is probably the last release of the 4.x series. It will be merged
4
+ to ruby and will be put into maintenance mode there.
5
+
6
+ I'm not set in stone on this, but at this point further development of
7
+ minitest (5+) will be gem-only. It is just too hard to work w/in
8
+ ruby-core w/ test-unit compatibility holding minitest development
9
+ back.
10
+
11
+ * 2 minor enhancements:
12
+
13
+ * Added count/size to ParallelEach to fix use w/in stdlib's test/unit. :( (btaitelb)
14
+ * Allow disabling of info_signal handler in runner. (erikh)
15
+
1
16
  === 4.7.3 / 2013-04-20
2
17
 
3
18
  * 1 bug fix:
@@ -48,6 +48,12 @@ class ParallelEach
48
48
  }
49
49
  threads.map(&:join)
50
50
  end
51
+
52
+ def count
53
+ [@queue.size - N, 0].max
54
+ end
55
+
56
+ alias_method :size, :count
51
57
  end
52
58
 
53
59
  class MiniTest::Unit
@@ -731,7 +731,7 @@ module MiniTest
731
731
  end
732
732
 
733
733
  class Unit # :nodoc:
734
- VERSION = "4.7.3" # :nodoc:
734
+ VERSION = "4.7.4" # :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 SUPPORTS_INFO_SIGNAL
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 SUPPORTS_INFO_SIGNAL
1282
+ trap 'INFO', 'DEFAULT' if runner.info_signal
1273
1283
  end
1274
1284
  result
1275
1285
  end
@@ -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: 37
4
+ hash: 43
5
5
  prerelease:
6
6
  segments:
7
7
  - 4
8
8
  - 7
9
- - 3
10
- version: 4.7.3
9
+ - 4
10
+ version: 4.7.4
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-04-21 00:00:00 Z
39
+ date: 2013-05-01 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
metadata.gz.sig CHANGED
Binary file