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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +11 -0
- data/lib/minitest.rb +1 -2
- data/lib/minitest/spec.rb +6 -6
- data/lib/minitest/test.rb +2 -0
- data/test/minitest/test_minitest_spec.rb +6 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac2144c0ad443090c5e70bf1e677da480f41d172
|
4
|
+
data.tar.gz: 2f1c4c6746de6356e3050c197bf8a951f32ce9ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 199fa9620e73107f167829d9076c7fd4347f0ccab63a42490be4231c22e67327b8baec370cc1c2553b422f63fef47f2b707c326e155635c11118d3100cca827d
|
7
|
+
data.tar.gz: 946d1ee85f934a6770dcfabdf069d76e576c34127fc4bf20cc3f20993f2bd4f6b5be3215ed227f6ab725d5e290502d218ad7c7e43a2042ddc66522ba5a2d3393
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -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:
|
data/lib/minitest.rb
CHANGED
@@ -7,7 +7,7 @@ require "minitest/parallel"
|
|
7
7
|
# :include: README.txt
|
8
8
|
|
9
9
|
module Minitest
|
10
|
-
VERSION = "5.
|
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
|
data/lib/minitest/spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
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
|
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
|
data/lib/minitest/test.rb
CHANGED
@@ -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.
|
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-
|
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
|