minitest 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +11 -0
- data/README.rdoc +0 -4
- data/lib/minitest.rb +3 -1
- data/lib/minitest/mock.rb +9 -3
- data/lib/minitest/pride_plugin.rb +1 -1
- 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: cadf6da908e8558c23ccb2b48f04440c58548170
|
4
|
+
data.tar.gz: 3da4643eb6db1d74cdac7ba8aaa47f74865ae5fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c522d5cd91d724391203d28a4e18310113c368d42da3e3a068733414db307b8368a1fd4a28567bc9da19d6c374b7dffee98efe37deb53273f390f7c911c8d4f
|
7
|
+
data.tar.gz: 4935850af98ba3ea0c2a784333d1c831c4feea72c5b88a903006d1feeba87aebabf02c47b81869d1cbf4eade1dcfda95216b2512509d1c61b2bfd739fad92039
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== 5.8.0 / 2015-08-06
|
2
|
+
|
3
|
+
* 2 minor enhancements:
|
4
|
+
|
5
|
+
* Add optional delegation mechanism to extend object with a mock. (zamith)
|
6
|
+
* Return early if there are no filtered methods. (jeremyevans)
|
7
|
+
|
8
|
+
* 1 bug fix:
|
9
|
+
|
10
|
+
* Don't extend io with pride if io is not a tty. (toy)
|
11
|
+
|
1
12
|
=== 5.7.0 / 2015-05-27
|
2
13
|
|
3
14
|
* 1 major enhancement:
|
data/README.rdoc
CHANGED
@@ -446,7 +446,6 @@ color_pound_spec_reporter :: Test names print Ruby Object types in color with
|
|
446
446
|
minispec-metadata :: Metadata for describe/it blocks & CLI tag filter.
|
447
447
|
E.g. `it "requires JS driver", js: true do` &
|
448
448
|
`ruby test.rb --tag js` runs tests tagged :js.
|
449
|
-
minitest-ansi :: Colorize minitest output with ANSI colors.
|
450
449
|
minitest-around :: Around block for minitest. An alternative to
|
451
450
|
setup/teardown dance.
|
452
451
|
minitest-autotest :: autotest is a continous testing facility meant to
|
@@ -462,8 +461,6 @@ minitest-capybara :: Capybara matchers support for minitest unit and
|
|
462
461
|
spec.
|
463
462
|
minitest-chef-handler :: Run Minitest suites as Chef report handlers
|
464
463
|
minitest-ci :: CI reporter plugin for Minitest.
|
465
|
-
minitest-colorize :: Colorize Minitest output and show failing tests
|
466
|
-
instantly.
|
467
464
|
minitest-context :: Defines contexts for code reuse in Minitest
|
468
465
|
specs that share common expectations.
|
469
466
|
minitest-debugger :: Wraps assert so failed assertions drop into
|
@@ -552,7 +549,6 @@ minitest-unordered :: Adds a new assertion to minitest for checking the
|
|
552
549
|
contents of a collection, ignoring element order.
|
553
550
|
minitest-vcr :: Automatic cassette managment with Minitest::Spec
|
554
551
|
and VCR.
|
555
|
-
minitest-wscolor :: Yet another test colorizer.
|
556
552
|
minitest_owrapper :: Get tests results as a TestResult object.
|
557
553
|
minitest_should :: Shoulda style syntax for minitest test::unit.
|
558
554
|
minitest_tu_shim :: Bridges between test/unit and minitest.
|
data/lib/minitest.rb
CHANGED
@@ -7,7 +7,7 @@ require "minitest/parallel"
|
|
7
7
|
# :include: README.rdoc
|
8
8
|
|
9
9
|
module Minitest
|
10
|
-
VERSION = "5.
|
10
|
+
VERSION = "5.8.0" # :nodoc:
|
11
11
|
ENCS = "".respond_to? :encoding # :nodoc:
|
12
12
|
|
13
13
|
@@installed_at_exit ||= false
|
@@ -289,6 +289,8 @@ module Minitest
|
|
289
289
|
filter === m || filter === "#{self}##{m}"
|
290
290
|
}
|
291
291
|
|
292
|
+
return if filtered_methods.empty?
|
293
|
+
|
292
294
|
with_info_handler reporter do
|
293
295
|
filtered_methods.each do |method_name|
|
294
296
|
run_one_method self, method_name, reporter
|
data/lib/minitest/mock.rb
CHANGED
@@ -37,7 +37,8 @@ module Minitest # :nodoc:
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
def initialize # :nodoc:
|
40
|
+
def initialize(delegator = nil) # :nodoc:
|
41
|
+
@delegator = delegator
|
41
42
|
@expected_calls = Hash.new { |calls, name| calls[name] = [] }
|
42
43
|
@actual_calls = Hash.new { |calls, name| calls[name] = [] }
|
43
44
|
end
|
@@ -111,8 +112,12 @@ module Minitest # :nodoc:
|
|
111
112
|
|
112
113
|
def method_missing(sym, *args, &block) # :nodoc:
|
113
114
|
unless @expected_calls.key?(sym) then
|
114
|
-
|
115
|
-
|
115
|
+
if @delegator && @delegator.respond_to?(sym)
|
116
|
+
return @delegator.public_send(sym, *args, &block)
|
117
|
+
else
|
118
|
+
raise NoMethodError, "unmocked method %p, expected one of %p" %
|
119
|
+
[sym, @expected_calls.keys.sort_by(&:to_s)]
|
120
|
+
end
|
116
121
|
end
|
117
122
|
|
118
123
|
index = @actual_calls[sym].length
|
@@ -161,6 +166,7 @@ module Minitest # :nodoc:
|
|
161
166
|
|
162
167
|
def respond_to?(sym, include_private = false) # :nodoc:
|
163
168
|
return true if @expected_calls.key? sym.to_sym
|
169
|
+
return true if @delegator && @delegator.respond_to?(sym, include_private)
|
164
170
|
__respond_to?(sym, include_private)
|
165
171
|
end
|
166
172
|
end
|
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.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
30
|
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2015-
|
32
|
+
date: 2015-08-06 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
metadata.gz.sig
CHANGED
Binary file
|