rubocop-minitest 0.12.1 → 0.13.0

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: 3e7a3871e612b7ff9a9fd9c5c83bb092ea6097f6b4838246b45346dd4ccc0d4a
4
- data.tar.gz: 1ba5c7ebe8764918e623fc45a5dc198700172ea5892db6744cbfd01eaf449023
3
+ metadata.gz: cb85f2ad7f928abf4e8f8e2c22c8508700960b11bdb8215b4ca8ea792a96dd73
4
+ data.tar.gz: 404314baeb561c4be2bd64eb1ec154d014942975ce4c0780b43df4c1a35e9286
5
5
  SHA512:
6
- metadata.gz: 9ddaa753e8ed446249b730b252e6c7d5e7b2b8029e65c025cd5a7b451fd53f9b0205e8bded8e7aa3be8ec476322c600d04b7b88c300543d8266526ab92a491e0
7
- data.tar.gz: 404825f75cd7d39bb6945dcda51f17c012529874feb662b4f4eeb821c63b4931f49ff64391b7deac1111361bd4fd4e458740f1e2c20047d8898d9ae3192c6341
6
+ metadata.gz: b20af6e92af74832f025aad226808d3343da4dd427149137b331a0ad177ab6aabcf5f326dfc83022aa50b73dc21fc48e4bb5149f2aa2506c7cf4ba7a0b7a97ac
7
+ data.tar.gz: a535fb3d220ec32ceb6c1fb2cd75f7cdd7061709334609e566900e65c47506ea15751827f8b49d3f73af8cc8b39705534c817b55aead18c3f3206e877f0996b8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.13.0 (2021-06-20)
6
+
7
+ ### New features
8
+
9
+ * [#136](https://github.com/rubocop/rubocop-minitest/pull/136): Support Active Support's `test` method for `Minitest/MultipleAssertions` and `Minitest/NoAssertions` cops. ([@koic][])
10
+
5
11
  ## 0.12.1 (2021-04-25)
6
12
 
7
13
  ### Bug fixes
data/Gemfile CHANGED
@@ -9,5 +9,5 @@ gemspec
9
9
  gem 'bump', require: false
10
10
  gem 'rake'
11
11
  gem 'rubocop', github: 'rubocop/rubocop'
12
- gem 'rubocop-performance', '~> 1.10.0'
12
+ gem 'rubocop-performance', '~> 1.11.0'
13
13
  gem 'yard', '~> 0.9'
data/docs/antora.yml CHANGED
@@ -2,6 +2,6 @@ name: rubocop-minitest
2
2
  title: RuboCop Minitest
3
3
  # We always provide version without patch here (e.g. 1.1),
4
4
  # as patch versions should not appear in the docs.
5
- version: '0.12'
5
+ version: '0.13'
6
6
  nav:
7
7
  - modules/ROOT/nav.adoc
@@ -43,7 +43,7 @@ module RuboCop
43
43
  self.max = assertions_count
44
44
 
45
45
  message = format(MSG, total: assertions_count, max: max_assertions)
46
- add_offense(node.loc.name, message: message)
46
+ add_offense(node, message: message)
47
47
  end
48
48
  end
49
49
 
@@ -44,7 +44,13 @@ module RuboCop
44
44
  end
45
45
 
46
46
  def test_cases(class_node)
47
- class_def_nodes(class_node).select { |def_node| test_case_name?(def_node.method_name) }
47
+ test_cases = class_def_nodes(class_node).select { |def_node| test_case_name?(def_node.method_name) }
48
+
49
+ # Support Active Support's `test 'example' { ... }` method.
50
+ # https://api.rubyonrails.org/classes/ActiveSupport/Testing/Declarative.html
51
+ test_blocks = class_node.each_descendant(:block).select { |block_node| block_node.method?(:test) }
52
+
53
+ test_cases + test_blocks
48
54
  end
49
55
 
50
56
  def lifecycle_hooks(class_node)
@@ -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.12.1'
7
+ STRING = '0.13.0'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
@@ -0,0 +1,5 @@
1
+ ### New features
2
+
3
+ * [#136](https://github.com/rubocop/rubocop-minitest/pull/136): Support Active Support's `test` method for `Minitest/MultipleAssertions` and `Minitest/NoAssertions` cops. ([@koic][])
4
+
5
+ [@koic]: https://github.com/koic
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  desc 'Syntax check for the documentation comments'
35
35
  task documentation_syntax_check: :yard_for_generate_documentation do
36
- require 'parser/ruby25'
36
+ require 'parser/ruby30'
37
37
 
38
38
  ok = true
39
39
  YARD::Registry.load!
@@ -48,7 +48,7 @@ task documentation_syntax_check: :yard_for_generate_documentation do
48
48
  examples.to_a.each do |example|
49
49
  buffer = Parser::Source::Buffer.new('<code>', 1)
50
50
  buffer.source = example.text
51
- parser = Parser::Ruby25.new(RuboCop::AST::Builder.new)
51
+ parser = Parser::Ruby30.new(RuboCop::AST::Builder.new)
52
52
  parser.diagnostics.all_errors_are_fatal = true
53
53
  parser.parse(buffer)
54
54
  rescue Parser::SyntaxError => e
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.12.1
4
+ version: 0.13.0
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: 2021-04-25 00:00:00.000000000 Z
13
+ date: 2021-06-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -138,6 +138,7 @@ files:
138
138
  - relnotes/v0.11.1.md
139
139
  - relnotes/v0.12.0.md
140
140
  - relnotes/v0.12.1.md
141
+ - relnotes/v0.13.0.md
141
142
  - relnotes/v0.2.0.md
142
143
  - relnotes/v0.2.1.md
143
144
  - relnotes/v0.3.0.md
@@ -162,7 +163,7 @@ metadata:
162
163
  homepage_uri: https://docs.rubocop.org/rubocop-minitest/
163
164
  changelog_uri: https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md
164
165
  source_code_uri: https://github.com/rubocop/rubocop-minitest
165
- documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.12
166
+ documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.13
166
167
  bug_tracker_uri: https://github.com/rubocop/rubocop-minitest/issues
167
168
  post_install_message:
168
169
  rdoc_options: []
@@ -179,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
180
  - !ruby/object:Gem::Version
180
181
  version: '0'
181
182
  requirements: []
182
- rubygems_version: 3.2.13
183
+ rubygems_version: 3.2.18
183
184
  signing_key:
184
185
  specification_version: 4
185
186
  summary: Automatic Minitest code style checking tool.