rubocop-minitest 0.22.0 → 0.22.2

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: c8a90bf7594f331c351450d9cd2012ab3c7378e72c24fad69c79a052983d2ea8
4
+ data.tar.gz: 9cbdab3ceafeddbe54fba39ea451c5347489dae3066f36208635b7aea2abcd7e
5
5
  SHA512:
6
- metadata.gz: 70a99db12a8e7b52fcf9beac4abab5ffa7f3fa02a4313677cddeae8ba28028682151b4675d0d41de54788f793edb6118a800b3eec10d61511735f61c0c716e16
7
- data.tar.gz: 9ce389c156f54cfa50f206c562c4a6360067c4fcc73a1798343e7f2accd776c0c9d0b13839db2d608503ab49d314bbc93882e46f0355c9c9e7751481a533b689
6
+ metadata.gz: 8b0d79ca4c4de8521c71b8752bc759f346efd898e7538acf1e424b7f3920ca291a9e85b7017eeae7a251313643c5bd0a4abcfaa042e14ac1c592ca8c9e3dde47
7
+ data.tar.gz: 838aa30294ec6f330a90dd500bbdce42febf70fa40e0e9b32490a9ffd7d663634e343a8cc321a7aa1e46a417373e26cb89f85d1d551a1b8ec2c4b1ffb1375542
@@ -18,7 +18,7 @@ module RuboCop
18
18
  class RefuteMatch < Base
19
19
  extend MinitestCopRule
20
20
 
21
- define_rule :refute, target_method: :match
21
+ define_rule :refute, target_method: :match, inverse: 'regexp_type?'
22
22
  end
23
23
  end
24
24
  end
@@ -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.2'
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.2
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-10-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop