minitest 2.2.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ === 2.2.2 / 2011-06-01
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Got rid of the trailing period in message for assert_equal. (tenderlove)
6
+ * Windows needs more flushing. (Akio Tajima)
7
+
1
8
  === 2.2.1 / 2011-05-31
2
9
 
3
10
  * 1 bug fix:
@@ -115,10 +115,11 @@ module MiniTest
115
115
 
116
116
  Tempfile.open("expect") do |a|
117
117
  a.puts expect
118
- a.rewind
118
+ a.flush
119
+
119
120
  Tempfile.open("butwas") do |b|
120
121
  b.puts butwas
121
- b.rewind
122
+ b.flush
122
123
 
123
124
  result = `#{MiniTest::Assertions.diff} #{a.path} #{b.path}`
124
125
  result.sub!(/^\-\-\- .+/, "--- expected")
@@ -210,7 +211,7 @@ module MiniTest
210
211
  # See also: MiniTest::Assertions.diff
211
212
 
212
213
  def assert_equal exp, act, msg = nil
213
- msg = message(msg) { diff exp, act }
214
+ msg = message(msg, "") { diff exp, act }
214
215
  assert(exp == act, msg)
215
216
  end
216
217
 
@@ -458,10 +459,10 @@ module MiniTest
458
459
  ##
459
460
  # Returns a proc that will output +msg+ along with the default message.
460
461
 
461
- def message msg = nil, &default
462
+ def message msg = nil, ending = ".", &default
462
463
  proc {
463
464
  custom_message = "#{msg}.\n" unless msg.nil? or msg.to_s.empty?
464
- "#{custom_message}#{default.call}."
465
+ "#{custom_message}#{default.call}#{ending}"
465
466
  }
466
467
  end
467
468
 
@@ -613,7 +614,7 @@ module MiniTest
613
614
  end
614
615
 
615
616
  class Unit
616
- VERSION = "2.2.1" # :nodoc:
617
+ VERSION = "2.2.2" # :nodoc:
617
618
 
618
619
  attr_accessor :report, :failures, :errors, :skips # :nodoc:
619
620
  attr_accessor :test_count, :assertion_count # :nodoc:
@@ -533,7 +533,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
533
533
  @@ -1 +1 @@
534
534
  -#<#<Class:0xXXXXXX>:0xXXXXXX @name=\"a\">
535
535
  +#<#<Class:0xXXXXXX>:0xXXXXXX @name=\"b\">
536
- .".gsub(/^ +/, "")
536
+ ".gsub(/^ +/, "")
537
537
 
538
538
  util_assert_triggered msg do
539
539
  @tc.assert_equal o1, o2
@@ -546,7 +546,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
546
546
 
547
547
  msg = "No visible difference.
548
548
  You should look at your implementation of Object#==.
549
- #<Object:0xXXXXXX>.".gsub(/^ +/, "")
549
+ #<Object:0xXXXXXX>".gsub(/^ +/, "")
550
550
 
551
551
  util_assert_triggered msg do
552
552
  @tc.assert_equal o1, o2
@@ -559,7 +559,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
559
559
  @@ -1 +1 @@
560
560
  -\"hahahahahahahahahahahahahahahahahahahaha\"
561
561
  +\"blahblahblahblahblahblahblahblahblahblah\"
562
- .".gsub(/^ +/, "")
562
+ ".gsub(/^ +/, "")
563
563
 
564
564
  util_assert_triggered msg do
565
565
  o1 = "haha" * 10
@@ -572,7 +572,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
572
572
  def test_assert_equal_different_long_invisible
573
573
  msg = "No visible difference.
574
574
  You should look at your implementation of String#==.
575
- \"blahblahblahblahblahblahblahblahblahblah\".".gsub(/^ +/, "")
575
+ \"blahblahblahblahblahblahblahblahblahblah\"".gsub(/^ +/, "")
576
576
 
577
577
  util_assert_triggered msg do
578
578
  o1 = "blah" * 10
@@ -591,7 +591,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
591
591
  @@ -1 +1 @@
592
592
  -\"hahahahahahahahahahahahahahahahahahahaha\"
593
593
  +\"blahblahblahblahblahblahblahblahblahblah\"
594
- .".gsub(/^ +/, "")
594
+ ".gsub(/^ +/, "")
595
595
 
596
596
  util_assert_triggered msg do
597
597
  o1 = "haha" * 10
@@ -613,7 +613,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
613
613
  end
614
614
 
615
615
  def test_assert_equal_different_short_multiline
616
- msg = "--- expected\n+++ actual\n@@ -1,2 +1,2 @@\n \"a\n-b\"\n+c\"\n."
616
+ msg = "--- expected\n+++ actual\n@@ -1,2 +1,2 @@\n \"a\n-b\"\n+c\"\n"
617
617
  util_assert_triggered msg do
618
618
  @tc.assert_equal "a\nb", "a\nc"
619
619
  end
@@ -1283,7 +1283,7 @@ FILE:LINE:in `test_assert_raises_triggered_subclass'
1283
1283
  end
1284
1284
 
1285
1285
  def util_msg exp, act, msg = nil
1286
- s = "Expected: #{exp.inspect}\n Actual: #{act.inspect}."
1286
+ s = "Expected: #{exp.inspect}\n Actual: #{act.inspect}"
1287
1287
  s = "#{msg}.\n#{s}" if msg
1288
1288
  s
1289
1289
  end
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: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 1
10
- version: 2.2.1
9
+ - 2
10
+ version: 2.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
metadata.gz.sig CHANGED
@@ -1,3 +1 @@
1
- o�@��]Z
2
- f��)C�^�����O�{g蔆1D���� �mT�
3
- a�_L�Ƒ�4�ʣL���^24��G����U6�;PWdć%�Urd������!��
1
+ [z����@J�䀫:�]��}:{U\Vq��vYW�Pm��`�T@��䟩5��~��N��xlXAfϹt�<�ak��J��֥������@1��!����{��O+�?�1ךL`�z�g�dž�G3a