rubocop-minitest 0.26.0 → 0.26.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: 90dad8a03c65bc80912012a2dacd5e8f6dd89485c72930a6348d16f489d2a8a9
4
- data.tar.gz: 5465e2ad38af5358f9942cf47fbeffc00abbee76dec902835d3fa67be2a678fd
3
+ metadata.gz: 30d74ad78ccdb578c6cc6e19c201f1b14869fea35d42f20c951e2a3ccd9da72d
4
+ data.tar.gz: 4ebac2d4e8a5efc3b0238388769986db1ab0625812cc378f0acd907428a180df
5
5
  SHA512:
6
- metadata.gz: 6d330efbe33b77b6bc18263644316525831433ef9f9a6e911fc2262ae698c7a90f0cc32a5a3f0ef021cea89f96cca3c355c9573f65a0a7479fceae61db7c3bbf
7
- data.tar.gz: 3f3487a2714c447d9b6cc97f28d8e1767835b25f2feb160bf967b86f90f77242de8d0ce07d50fc6992786112ac06ade62870e4d83887fb4c964a8cfcd9a40248
6
+ metadata.gz: a6b65afa72586fd58d096ce07858b0373cb65d9ba637807d557e7043347856e3ad69bd0fba61e1ef80fb69fb2928a4f6234200e40454ac068b85ec6579f03c36
7
+ data.tar.gz: c5d62abb9019d7b89c7c4e5b2e50cbf696e1ef6fd31323c2674648faa1f535f50e96f45778f3b17078126a74a4e324125f3ec34b054a3f44ec91288d9046e221
@@ -50,8 +50,9 @@ module RuboCop
50
50
  private
51
51
 
52
52
  def assertions_count(node)
53
- base = assertion_method?(node) ? 1 : 0
54
- base + node.each_child_node.sum { |c| assertions_count(c) }
53
+ node.each_descendant(:send).count do |send_node|
54
+ assertion_method?(send_node)
55
+ end
55
56
  end
56
57
 
57
58
  def max_assertions
@@ -21,7 +21,8 @@ module RuboCop
21
21
  MSG = 'Test file path should start with `test_` or end with `_test.rb`.'
22
22
 
23
23
  def on_new_investigation
24
- return unless test_file?(processed_source.ast)
24
+ return unless (ast = processed_source.ast)
25
+ return unless test_file?(ast)
25
26
 
26
27
  add_global_offense(MSG) unless valid_file_name?
27
28
  end
@@ -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.26.0'
7
+ STRING = '0.26.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.26.0
4
+ version: 0.26.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: 2023-01-14 00:00:00.000000000 Z
13
+ date: 2023-01-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop