rr 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +13 -1
- data/lib/rr/integrations/minitest_4.rb +12 -1
- data/lib/rr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7690f50ed3d2cb136611f0fe21955d6b29fc8a58be9dabcb7e342034dad13b66
|
4
|
+
data.tar.gz: c3ec0e439daecf5d736042cdd78e550c8e178fd3160bde8d47a1109c9552a68d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc4cab0df8cc92fd7e568ed36b392244ede5ef8ec908b01b15ac2d41eaf7d5cd3a8bb9c63f394894e43697d3baf6f326e643337b0286b3b0f02fcd38c11e2e7
|
7
|
+
data.tar.gz: ec16ec1798ed218454263a8bdb3facc5b2b66270ac35aaec3ef683d64cfb58350e223274a938c970a296719c05d163041bf8627651b95268f7cf52dc956792f7
|
data/CHANGES.md
CHANGED
@@ -1,10 +1,22 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.0.7 - 2021-08-17
|
4
|
+
|
5
|
+
### Fixes
|
6
|
+
|
7
|
+
* Minitest + Active Support integration: Fixed a bug that `stub` in
|
8
|
+
`setup {...}` is ignored.
|
9
|
+
[GitHub#87][Reported by Boris]
|
10
|
+
|
11
|
+
### Thanks
|
12
|
+
|
13
|
+
* Boris
|
14
|
+
|
3
15
|
## 3.0.6 - 2021-08-07
|
4
16
|
|
5
17
|
### Improvements
|
6
18
|
|
7
|
-
* `assert_received`:
|
19
|
+
* `assert_received`: Added support for keyword arguments.
|
8
20
|
[GitHub#86][Reported by imadoki]
|
9
21
|
|
10
22
|
### Thanks
|
@@ -39,10 +39,21 @@ module RR
|
|
39
39
|
include RR::DSL
|
40
40
|
include Mixin
|
41
41
|
|
42
|
+
if defined?(::ActiveSupport::TestCase)
|
43
|
+
is_active_support_test_case = lambda do |target|
|
44
|
+
false
|
45
|
+
end
|
46
|
+
else
|
47
|
+
is_active_support_test_case = lambda do |target|
|
48
|
+
target.is_a?(::ActiveSupport::TestCase)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
42
52
|
unless instance_methods.any? { |method_name| method_name.to_sym == :setup_with_rr }
|
43
53
|
alias_method :setup_without_rr, :setup
|
44
54
|
define_method(:setup_with_rr) do
|
45
55
|
setup_without_rr
|
56
|
+
return is_active_support_test_case.call(self)
|
46
57
|
RR.reset
|
47
58
|
RR.trim_backtrace = true
|
48
59
|
RR.overridden_error_class = assertion_error_class
|
@@ -52,7 +63,7 @@ module RR
|
|
52
63
|
alias_method :teardown_without_rr, :teardown
|
53
64
|
define_method(:teardown_with_rr) do
|
54
65
|
begin
|
55
|
-
RR.verify
|
66
|
+
RR.verify if is_active_support_test_case.call(self)
|
56
67
|
ensure
|
57
68
|
teardown_without_rr
|
58
69
|
end
|
data/lib/rr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-08-
|
13
|
+
date: 2021-08-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|