rubocop-minitest 0.22.0 → 0.22.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: 914b7325a79669c3eab38a4dd9c822aeddf4906658289d3a1d797a9f53646ebe
4
- data.tar.gz: 3eb6732b5ef6a7e12dfe4edf72fea04d6ba809bb3ccba81eec57cb036b636605
3
+ metadata.gz: 6db30fddaa89f75fb61790465161c9de6e0fd0c7d3808afa9d091e9eac97a30e
4
+ data.tar.gz: fbf5dac86cbf247ded62e437f5cb79e8c1dece32b7ec78eeda0b3c8c20fdd7d7
5
5
  SHA512:
6
- metadata.gz: 70a99db12a8e7b52fcf9beac4abab5ffa7f3fa02a4313677cddeae8ba28028682151b4675d0d41de54788f793edb6118a800b3eec10d61511735f61c0c716e16
7
- data.tar.gz: 9ce389c156f54cfa50f206c562c4a6360067c4fcc73a1798343e7f2accd776c0c9d0b13839db2d608503ab49d314bbc93882e46f0355c9c9e7751481a533b689
6
+ metadata.gz: b5c7535584d692c5a2e4c62ddcfdd89939594b6c51082ba2d497f81b36b8a0b7153940c2846a14dfea681f5fe51753324e90e4d7488fb477a96e99b7aa8f2a77
7
+ data.tar.gz: 5e53402c171a4dabe59f71a8d102cfd5e8dd963c47d082f305803c749f258bcf1c114e552cbc8fde60a0486002348520c6dd46fa06d3476a80b5b967835e2013
@@ -36,7 +36,8 @@ module RuboCop
36
36
  def on_send(node)
37
37
  return unless node.method?(:#{assertion_method})
38
38
  return unless (arguments = peel_redundant_parentheses_from(node.arguments))
39
- return unless arguments.first.respond_to?(:method?) && arguments.first.method?(:#{target_method})
39
+ return unless arguments.first&.call_type?
40
+ return if arguments.first.arguments.empty? || !arguments.first.method?(:#{target_method})
40
41
 
41
42
  add_offense(node, message: offense_message(arguments)) do |corrector|
42
43
  autocorrect(corrector, node, arguments)
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Minitest
5
5
  # This module holds the RuboCop Minitest version information.
6
6
  module Version
7
- STRING = '0.22.0'
7
+ STRING = '0.22.1'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-09-08 00:00:00.000000000 Z
13
+ date: 2022-09-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop