minitest 3.3.0 → 3.4.0

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
+ === 3.4.0 / 2012-09-05
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * assert_output can now take regexps for expected values. (suggested by stomar)
6
+ * Clarified that ruby 1.9/2.0's phony gems cause serious confusion for rubygems.
7
+
1
8
  === 3.3.0 / 2012-07-26
2
9
 
3
10
  * 1 major enhancement:
data/README.txt CHANGED
@@ -315,6 +315,13 @@ the gem, but you'll need to activate the gem explicitly to use it:
315
315
 
316
316
  # ... usual testing stuffs ...
317
317
 
318
+ DO NOTE: There is a serious problem with the way that ruby 1.9/2.0
319
+ packages their own gems. They install a gem specification file, but
320
+ don't install the gem contents in the gem path. This messes up
321
+ Gem.find_files and many other things (gem which, gem contents, etc).
322
+
323
+ Just install minitest as a gem for real and you'll be happier.
324
+
318
325
  == LICENSE:
319
326
 
320
327
  (The MIT License)
@@ -304,7 +304,8 @@ module MiniTest
304
304
  ##
305
305
  # Fails if stdout or stderr do not output the expected results.
306
306
  # Pass in nil if you don't care about that streams output. Pass in
307
- # "" if you require it to be silent.
307
+ # "" if you require it to be silent. Pass in a regexp if you want
308
+ # to pattern match.
308
309
  #
309
310
  # See also: #assert_silent
310
311
 
@@ -313,8 +314,11 @@ module MiniTest
313
314
  yield
314
315
  end
315
316
 
316
- y = assert_equal stderr, err, "In stderr" if stderr
317
- x = assert_equal stdout, out, "In stdout" if stdout
317
+ err_msg = Regexp === stderr ? :assert_match : :assert_equal if stderr
318
+ out_msg = Regexp === stdout ? :assert_match : :assert_equal if stdout
319
+
320
+ y = send err_msg, stderr, err, "In stderr" if err_msg
321
+ x = send out_msg, stdout, out, "In stdout" if out_msg
318
322
 
319
323
  (!stdout || x) && (!stderr || y)
320
324
  end
@@ -648,7 +652,7 @@ module MiniTest
648
652
  end
649
653
 
650
654
  class Unit # :nodoc:
651
- VERSION = "3.3.0" # :nodoc:
655
+ VERSION = "3.4.0" # :nodoc:
652
656
 
653
657
  attr_accessor :report, :failures, :errors, :skips # :nodoc:
654
658
  attr_accessor :test_count, :assertion_count # :nodoc:
@@ -890,6 +890,15 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
890
890
  end
891
891
  end
892
892
 
893
+ def test_assert_output_both_regexps
894
+ @assertion_count = 4
895
+
896
+ @tc.assert_output(/y.y/, /bl.h/) do
897
+ print "yay"
898
+ $stderr.print "blah"
899
+ end
900
+ end
901
+
893
902
  def test_assert_output_err
894
903
  @tc.assert_output nil, "blah" do
895
904
  $stderr.print "blah"
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: 11
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 3.3.0
10
+ version: 3.4.0
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: 2012-07-27 00:00:00 Z
39
+ date: 2012-09-05 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
metadata.gz.sig CHANGED
@@ -1,2 +1,4 @@
1
- ��ވ
2
- ��(V�U���&�<�|�!���Oc�z_���B��)r����SjN���9�upf��Z��N<ۘ* �|���K�utox�l��9��$�m�BX�@VGv��ft�aRθ�o.�q��'$��It^�˴�����0�R�g\��N�^���N;��T��KJ�O(
1
+ ��uO�V�Y��p'�+��`�=�d�V��^ݰ��D.�y�ܸ���4���&>�Z��,���ӵL��8
2
+ ��}6e�$��� ��F��M�ȕT��s��y
3
+ M7�.u쥭K�m���ʇ�k��)�ȩ@�`&���o��ng��$�x����F�E�TnθI��>�T��i?�_"Z��9k�Dy��V8ö$K12�{�vG��!�+d��Z?�i?<FLb?��U
4
+ �������$�bɺ .}�T�����