minitest 4.3.1 → 4.3.2

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,9 @@
1
+ === 4.3.2 / 2012-11-27
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Improved assert_equals error message to point you at #== of member objects. (kcurtin)
6
+
1
7
  === 4.3.1 / 2012-11-23
2
8
 
3
9
  * 1 bug fix:
@@ -141,10 +141,11 @@ module MiniTest
141
141
  if result.empty? then
142
142
  klass = exp.class
143
143
  result = [
144
- "No visible difference in the #{klass}#inspect output.",
145
- "You should look at your implementation of #{klass}#==.",
146
- expect
147
- ].join "\n"
144
+ "No visible difference in the #{klass}#inspect output.\n",
145
+ "You should look at the implementation of #== on ",
146
+ "#{klass} or its members.\n",
147
+ expect,
148
+ ].join
148
149
  end
149
150
  end
150
151
  end
@@ -729,7 +730,7 @@ module MiniTest
729
730
  end
730
731
 
731
732
  class Unit # :nodoc:
732
- VERSION = "4.3.1" # :nodoc:
733
+ VERSION = "4.3.2" # :nodoc:
733
734
 
734
735
  attr_accessor :report, :failures, :errors, :skips # :nodoc:
735
736
  attr_accessor :test_count, :assertion_count # :nodoc:
@@ -737,6 +737,30 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
737
737
  @tc.assert_equal 1, 1
738
738
  end
739
739
 
740
+ def test_assert_equal_different_collection_array_hex_invisible
741
+ object1 = Object.new
742
+ object2 = Object.new
743
+ msg = "No visible difference in the Array#inspect output.
744
+ You should look at the implementation of #== on Array or its members.
745
+ [#<Object:0xXXXXXX>]".gsub(/^ +/, "")
746
+ util_assert_triggered msg do
747
+ @tc.assert_equal [object1], [object2]
748
+ end
749
+ end
750
+
751
+ def test_assert_equal_different_collection_hash_hex_invisible
752
+ h1, h2 = {}, {}
753
+ h1[1] = Object.new
754
+ h2[1] = Object.new
755
+ msg = "No visible difference in the Hash#inspect output.
756
+ You should look at the implementation of #== on Hash or its members.
757
+ {1=>#<Object:0xXXXXXX>}".gsub(/^ +/, "")
758
+
759
+ util_assert_triggered msg do
760
+ @tc.assert_equal h1, h2
761
+ end
762
+ end
763
+
740
764
  def test_assert_equal_different_diff_deactivated
741
765
  without_diff do
742
766
  util_assert_triggered util_msg("haha" * 10, "blah" * 10) do
@@ -772,7 +796,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
772
796
  o2 = Object.new
773
797
 
774
798
  msg = "No visible difference in the Object#inspect output.
775
- You should look at your implementation of Object#==.
799
+ You should look at the implementation of #== on Object or its members.
776
800
  #<Object:0xXXXXXX>".gsub(/^ +/, "")
777
801
 
778
802
  util_assert_triggered msg do
@@ -798,7 +822,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
798
822
 
799
823
  def test_assert_equal_different_long_invisible
800
824
  msg = "No visible difference in the String#inspect output.
801
- You should look at your implementation of String#==.
825
+ You should look at the implementation of #== on String or its members.
802
826
  \"blahblahblahblahblahblahblahblahblahblah\"".gsub(/^ +/, "")
803
827
 
804
828
  util_assert_triggered msg do
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: 49
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 4
8
8
  - 3
9
- - 1
10
- version: 4.3.1
9
+ - 2
10
+ version: 4.3.2
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-11-23 00:00:00 Z
39
+ date: 2012-11-28 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
metadata.gz.sig CHANGED
Binary file