rubocop-minitest 0.34.0 → 0.34.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e59babe7e9ae552aee440a3e5eb5767af585357899d8f4fbac8f54247494b87
|
4
|
+
data.tar.gz: 4f61d9b471cdda223fbd1fe239656b2a47e5216a2903588ce05f5a4909d5fb21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d14b60b50dacf5f28470b18ea5d03c19507e21063bf54a971b67a5b4d10255e048bcf75052f4645aa049a25ff54dd6f8022255b5c11bdef650c63f84fa4ed1f
|
7
|
+
data.tar.gz: 3e3389f3ba19ea5a8c08ee1b57c5eb9d8da15b17c1b80d36c21470bd096a6753e9108c7de8d84ebb0f702b797310af241e401a16ea2207dc12d4891135c5efa9
|
@@ -99,8 +99,9 @@ module RuboCop
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
102
103
|
def assertion_method?(node)
|
103
|
-
return assertion_method?(node.expression) if node.assignment?
|
104
|
+
return assertion_method?(node.expression) if node.assignment? && node.respond_to?(:expression)
|
104
105
|
return false if !node.send_type? && !node.block_type? && !node.numblock_type?
|
105
106
|
|
106
107
|
ASSERTION_PREFIXES.any? do |prefix|
|
@@ -109,6 +110,7 @@ module RuboCop
|
|
109
110
|
method_name.start_with?(prefix) || node.method?(:flunk)
|
110
111
|
end
|
111
112
|
end
|
113
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
112
114
|
|
113
115
|
def lifecycle_hook_method?(node)
|
114
116
|
node.def_type? && LIFECYCLE_HOOK_METHODS.include?(node.method_name)
|