minitest 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +7 -0
- data/lib/minitest/spec.rb +2 -1
- data/lib/minitest/unit.rb +3 -3
- data/test/test_minitest_unit.rb +14 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/minitest/spec.rb
CHANGED
data/lib/minitest/unit.rb
CHANGED
@@ -294,7 +294,7 @@ module MiniTest
|
|
294
294
|
# assert_operator 5, :<=, 4
|
295
295
|
|
296
296
|
def assert_operator o1, op, o2 = UNDEFINED, msg = nil
|
297
|
-
return assert_predicate o1, op, msg if
|
297
|
+
return assert_predicate o1, op, msg if UNDEFINED == o2
|
298
298
|
msg = message(msg) { "Expected #{mu_pp(o1)} to be #{op} #{mu_pp(o2)}" }
|
299
299
|
assert o1.__send__(op, o2), msg
|
300
300
|
end
|
@@ -595,7 +595,7 @@ module MiniTest
|
|
595
595
|
# refute_operator 1, :<, 2 #=> fail
|
596
596
|
|
597
597
|
def refute_operator o1, op, o2 = UNDEFINED, msg = nil
|
598
|
-
return refute_predicate o1, op if
|
598
|
+
return refute_predicate o1, op, msg if UNDEFINED == o2
|
599
599
|
msg = message(msg) { "Expected #{mu_pp(o1)} to not be #{op} #{mu_pp(o2)}"}
|
600
600
|
refute o1.__send__(op, o2), msg
|
601
601
|
end
|
@@ -645,7 +645,7 @@ module MiniTest
|
|
645
645
|
end
|
646
646
|
|
647
647
|
class Unit
|
648
|
-
VERSION = "2.6.
|
648
|
+
VERSION = "2.6.1" # :nodoc:
|
649
649
|
|
650
650
|
attr_accessor :report, :failures, :errors, :skips # :nodoc:
|
651
651
|
attr_accessor :test_count, :assertion_count # :nodoc:
|
data/test/test_minitest_unit.rb
CHANGED
@@ -877,6 +877,13 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
|
|
877
877
|
@tc.assert_operator 2, :>, 1
|
878
878
|
end
|
879
879
|
|
880
|
+
def test_assert_operator_bad_object
|
881
|
+
bad = Object.new
|
882
|
+
def bad.==(other) true end
|
883
|
+
|
884
|
+
@tc.assert_operator bad, :equal?, bad
|
885
|
+
end
|
886
|
+
|
880
887
|
def test_assert_operator_triggered
|
881
888
|
util_assert_triggered "Expected 2 to be < 1." do
|
882
889
|
@tc.assert_operator 2, :<, 1
|
@@ -1358,6 +1365,13 @@ FILE:LINE:in `test_assert_raises_triggered_subclass'
|
|
1358
1365
|
@tc.refute_operator 2, :<, 1
|
1359
1366
|
end
|
1360
1367
|
|
1368
|
+
def test_refute_operator_bad_object
|
1369
|
+
bad = Object.new
|
1370
|
+
def bad.==(other) true end
|
1371
|
+
|
1372
|
+
@tc.refute_operator true, :equal?, bad
|
1373
|
+
end
|
1374
|
+
|
1361
1375
|
def test_refute_operator_triggered
|
1362
1376
|
util_assert_triggered "Expected 2 to not be > 1." do
|
1363
1377
|
@tc.refute_operator 2, :>, 1
|
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 2.6.
|
9
|
+
- 1
|
10
|
+
version: 2.6.1
|
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: 2011-09-
|
39
|
+
date: 2011-09-28 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: hoe
|
metadata.gz.sig
CHANGED
Binary file
|