minitest 4.7.4 → 4.7.5

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,10 @@
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
+
1
8
  === 4.7.4 / 2013-05-01
2
9
 
3
10
  This is probably the last release of the 4.x series. It will be merged
@@ -135,9 +135,8 @@ class MiniTest::Spec < MiniTest::Unit::TestCase
135
135
  }.last
136
136
  end
137
137
 
138
- @@describe_stack = []
139
138
  def describe_stack # :nodoc:
140
- @@describe_stack
139
+ Thread.current[:describe_stack] ||= []
141
140
  end
142
141
 
143
142
  ##
@@ -731,7 +731,7 @@ module MiniTest
731
731
  end
732
732
 
733
733
  class Unit # :nodoc:
734
- VERSION = "4.7.4" # :nodoc:
734
+ VERSION = "4.7.5" # :nodoc:
735
735
 
736
736
  attr_accessor :report, :failures, :errors, :skips # :nodoc:
737
737
  attr_accessor :assertion_count # :nodoc:
@@ -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
- synchronize do
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
- @tc.assert_operator Time.now.to_i, :>=, t
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
- synchronize do
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
- @tc.assert_operator Time.now.to_i, :>=, t
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
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: 43
4
+ hash: 41
5
5
  prerelease:
6
6
  segments:
7
7
  - 4
8
8
  - 7
9
- - 4
10
- version: 4.7.4
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-05-01 00:00:00 Z
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
@@ -1 +1 @@
1
- ����%
1
+ ���р dj�49��,��f�<v�~�N[x5�*`�;?mmuZ%ڽ��=�3���lٝ�e���M7j�̩���t�5l�r�šw��q6��d?M�ի���Z���W}��Ã�C��s���m�g'�L#�.Cdɣ�\��ph�Z*��r��q���U�뱐m�R˚��D:��P�E�XE��Thl��5�6_M\�����<��sr��>�5�~�u��ZGY�l�;<�z7���v[�,�)�p��