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 CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ === 2.6.1 / 2011-09-27
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Alias Spec.name from Spec.to_s so it works when @name is nil (nathany)
6
+ * Fixed assert and refute_operator where second object has a bad == method.
7
+
1
8
  === 2.6.0 / 2011-09-13
2
9
 
3
10
  * 2 minor enhancements:
@@ -236,8 +236,9 @@ class MiniTest::Spec < MiniTest::Unit::TestCase
236
236
 
237
237
  # :stopdoc:
238
238
  class << self
239
- attr_reader :name, :desc
239
+ attr_reader :desc
240
240
  alias :specify :it
241
+ alias :name :to_s
241
242
  end
242
243
  # :startdoc:
243
244
  end
@@ -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 o2 == UNDEFINED
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 o2 == UNDEFINED
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.0" # :nodoc:
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:
@@ -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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 6
9
- - 0
10
- version: 2.6.0
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-13 00:00:00 Z
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