minitest 5.3.5 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6376db419ca9212fa0c347a7ec809ab2a9ff2ef0
4
- data.tar.gz: 8b7789faff2960ee27c2dbec18fb27798acb2b0b
3
+ metadata.gz: ac2144c0ad443090c5e70bf1e677da480f41d172
4
+ data.tar.gz: 2f1c4c6746de6356e3050c197bf8a951f32ce9ea
5
5
  SHA512:
6
- metadata.gz: 7e454be77a703a05c58f56114dbbdca34c75a7f14fbe96ed6c0febd299a3d225fb4212974e9a071ba23f8b6983c0387b83053b76538ae42424375b93c0ff1499
7
- data.tar.gz: 26e272354b4bc8378fabab852c44ec972c7200e45234ebb5f01c497fa5c77a5112897ec18aca03a529a932561b97ded735f133e28d5d7388c436e1e678bc6ab0
6
+ metadata.gz: 199fa9620e73107f167829d9076c7fd4347f0ccab63a42490be4231c22e67327b8baec370cc1c2553b422f63fef47f2b707c326e155635c11118d3100cca827d
7
+ data.tar.gz: 946d1ee85f934a6770dcfabdf069d76e576c34127fc4bf20cc3f20993f2bd4f6b5be3215ed227f6ab725d5e290502d218ad7c7e43a2042ddc66522ba5a2d3393
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,14 @@
1
+ === 5.4.0 / 2014-07-07
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Kernel#describe extended to splat additional_desc.
6
+ * Spec#spec_type extended to take a splat of additional items, passed to matcher procs.
7
+
8
+ * 1 bug fix:
9
+
10
+ * minitest/spec should require minitest/test, not minitest/unit. (doudou)
11
+
1
12
  === 5.3.5 / 2014-06-17
2
13
 
3
14
  * 1 minor enhancement:
@@ -7,7 +7,7 @@ require "minitest/parallel"
7
7
  # :include: README.txt
8
8
 
9
9
  module Minitest
10
- VERSION = "5.3.5" # :nodoc:
10
+ VERSION = "5.4.0" # :nodoc:
11
11
 
12
12
  @@installed_at_exit ||= false
13
13
  @@after_run = []
@@ -763,4 +763,3 @@ module Minitest
763
763
  end
764
764
 
765
765
  require "minitest/test"
766
- require "minitest/unit" unless defined?(MiniTest) # compatibility layer only
@@ -1,4 +1,4 @@
1
- require 'minitest/unit'
1
+ require "minitest/test"
2
2
 
3
3
  class Module # :nodoc:
4
4
  def infect_an_assertion meth, new_name, dont_flip = false # :nodoc:
@@ -54,13 +54,13 @@ module Kernel # :nodoc:
54
54
  #
55
55
  # For more information about expectations, see Minitest::Expectations.
56
56
 
57
- def describe desc, additional_desc = nil, &block # :doc:
57
+ def describe desc, *additional_desc, &block # :doc:
58
58
  stack = Minitest::Spec.describe_stack
59
- name = [stack.last, desc, additional_desc].compact.join("::")
59
+ name = [stack.last, desc, *additional_desc].compact.join("::")
60
60
  sclas = stack.last || if Class === self && is_a?(Minitest::Spec::DSL) then
61
61
  self
62
62
  else
63
- Minitest::Spec.spec_type desc
63
+ Minitest::Spec.spec_type desc, *additional_desc
64
64
  end
65
65
 
66
66
  cls = sclas.create name, desc
@@ -132,10 +132,10 @@ class Minitest::Spec < Minitest::Test
132
132
  #
133
133
  # spec_type("BlahController") # => Minitest::Spec::Rails
134
134
 
135
- def spec_type desc
135
+ def spec_type desc, *additional
136
136
  TYPES.find { |matcher, klass|
137
137
  if matcher.respond_to? :call then
138
- matcher.call desc
138
+ matcher.call desc, *additional
139
139
  else
140
140
  matcher === desc.to_s
141
141
  end
@@ -281,3 +281,5 @@ module Minitest
281
281
  extend Guard
282
282
  end # Test
283
283
  end
284
+
285
+ require "minitest/unit" unless defined?(MiniTest) # compatibility layer only
@@ -674,9 +674,13 @@ class TestMeta < MetaMetaMetaTestCase
674
674
  Minitest::Spec.register_spec_type MiniSpecB do |desc|
675
675
  desc.superclass == ExampleA
676
676
  end
677
+ Minitest::Spec.register_spec_type MiniSpecC do |desc, *addl|
678
+ addl.include? :woot
679
+ end
677
680
 
678
681
  assert_equal MiniSpecA, Minitest::Spec.spec_type(ExampleA)
679
682
  assert_equal MiniSpecB, Minitest::Spec.spec_type(ExampleB)
683
+ assert_equal MiniSpecC, Minitest::Spec.spec_type(ExampleB, :woot)
680
684
  ensure
681
685
  Minitest::Spec::TYPES.replace original_types
682
686
  end
@@ -702,9 +706,11 @@ class TestMeta < MetaMetaMetaTestCase
702
706
  def test_name
703
707
  spec_a = describe ExampleA do; end
704
708
  spec_b = describe ExampleB, :random_method do; end
709
+ spec_c = describe ExampleB, :random_method, :addl_context do; end
705
710
 
706
711
  assert_equal "ExampleA", spec_a.name
707
712
  assert_equal "ExampleB::random_method", spec_b.name
713
+ assert_equal "ExampleB::random_method::addl_context", spec_c.name
708
714
  end
709
715
 
710
716
  def test_name2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.5
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
30
  xx3n58i0lQkBE1EpKE0lFu/y
31
31
  -----END CERTIFICATE-----
32
- date: 2014-06-18 00:00:00.000000000 Z
32
+ date: 2014-07-07 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rdoc
metadata.gz.sig CHANGED
Binary file