rubocop-rspec 1.42.0 → 1.44.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -2
  3. data/config/default.yml +41 -3
  4. data/lib/rubocop-rspec.rb +2 -1
  5. data/lib/rubocop/cop/rspec/align_left_let_brace.rb +1 -1
  6. data/lib/rubocop/cop/rspec/align_right_let_brace.rb +1 -1
  7. data/lib/rubocop/cop/rspec/any_instance.rb +1 -1
  8. data/lib/rubocop/cop/rspec/around_block.rb +2 -2
  9. data/lib/rubocop/cop/rspec/base.rb +76 -0
  10. data/lib/rubocop/cop/rspec/be.rb +1 -1
  11. data/lib/rubocop/cop/rspec/be_eql.rb +1 -1
  12. data/lib/rubocop/cop/rspec/before_after_all.rb +1 -1
  13. data/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +1 -1
  14. data/lib/rubocop/cop/rspec/capybara/feature_methods.rb +6 -3
  15. data/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +1 -1
  16. data/lib/rubocop/cop/rspec/context_method.rb +2 -2
  17. data/lib/rubocop/cop/rspec/context_wording.rb +3 -3
  18. data/lib/rubocop/cop/rspec/cop.rb +2 -66
  19. data/lib/rubocop/cop/rspec/describe_class.rb +40 -30
  20. data/lib/rubocop/cop/rspec/describe_method.rb +14 -6
  21. data/lib/rubocop/cop/rspec/describe_symbol.rb +2 -2
  22. data/lib/rubocop/cop/rspec/described_class.rb +2 -2
  23. data/lib/rubocop/cop/rspec/described_class_module_wrapping.rb +1 -1
  24. data/lib/rubocop/cop/rspec/dialect.rb +1 -1
  25. data/lib/rubocop/cop/rspec/empty_example_group.rb +124 -6
  26. data/lib/rubocop/cop/rspec/empty_hook.rb +1 -1
  27. data/lib/rubocop/cop/rspec/empty_line_after_example.rb +4 -8
  28. data/lib/rubocop/cop/rspec/empty_line_after_example_group.rb +4 -8
  29. data/lib/rubocop/cop/rspec/empty_line_after_final_let.rb +7 -10
  30. data/lib/rubocop/cop/rspec/empty_line_after_hook.rb +4 -8
  31. data/lib/rubocop/cop/rspec/empty_line_after_subject.rb +5 -8
  32. data/lib/rubocop/cop/rspec/example_length.rb +1 -1
  33. data/lib/rubocop/cop/rspec/example_without_description.rb +1 -1
  34. data/lib/rubocop/cop/rspec/example_wording.rb +4 -4
  35. data/lib/rubocop/cop/rspec/expect_actual.rb +1 -1
  36. data/lib/rubocop/cop/rspec/expect_change.rb +1 -1
  37. data/lib/rubocop/cop/rspec/expect_in_hook.rb +1 -1
  38. data/lib/rubocop/cop/rspec/expect_output.rb +1 -1
  39. data/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb +3 -3
  40. data/lib/rubocop/cop/rspec/factory_bot/create_list.rb +10 -6
  41. data/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb +1 -1
  42. data/lib/rubocop/cop/rspec/file_path.rb +25 -17
  43. data/lib/rubocop/cop/rspec/focus.rb +7 -11
  44. data/lib/rubocop/cop/rspec/hook_argument.rb +5 -6
  45. data/lib/rubocop/cop/rspec/hooks_before_examples.rb +1 -1
  46. data/lib/rubocop/cop/rspec/implicit_block_expectation.rb +2 -3
  47. data/lib/rubocop/cop/rspec/implicit_expect.rb +1 -1
  48. data/lib/rubocop/cop/rspec/implicit_subject.rb +8 -6
  49. data/lib/rubocop/cop/rspec/instance_spy.rb +1 -1
  50. data/lib/rubocop/cop/rspec/instance_variable.rb +1 -1
  51. data/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb +1 -1
  52. data/lib/rubocop/cop/rspec/it_behaves_like.rb +1 -1
  53. data/lib/rubocop/cop/rspec/iterated_expectation.rb +1 -1
  54. data/lib/rubocop/cop/rspec/leading_subject.rb +24 -17
  55. data/lib/rubocop/cop/rspec/leaky_constant_declaration.rb +1 -1
  56. data/lib/rubocop/cop/rspec/let_before_examples.rb +1 -1
  57. data/lib/rubocop/cop/rspec/let_setup.rb +6 -3
  58. data/lib/rubocop/cop/rspec/message_chain.rb +1 -1
  59. data/lib/rubocop/cop/rspec/message_expectation.rb +1 -1
  60. data/lib/rubocop/cop/rspec/message_spies.rb +1 -1
  61. data/lib/rubocop/cop/rspec/missing_example_group_argument.rb +1 -1
  62. data/lib/rubocop/cop/rspec/multiple_describes.rb +11 -8
  63. data/lib/rubocop/cop/rspec/multiple_expectations.rb +7 -11
  64. data/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb +148 -0
  65. data/lib/rubocop/cop/rspec/multiple_subjects.rb +1 -1
  66. data/lib/rubocop/cop/rspec/named_subject.rb +1 -1
  67. data/lib/rubocop/cop/rspec/nested_groups.rb +4 -4
  68. data/lib/rubocop/cop/rspec/not_to_not.rb +1 -1
  69. data/lib/rubocop/cop/rspec/overwriting_setup.rb +1 -1
  70. data/lib/rubocop/cop/rspec/pending.rb +1 -1
  71. data/lib/rubocop/cop/rspec/predicate_matcher.rb +7 -14
  72. data/lib/rubocop/cop/rspec/rails/http_status.rb +1 -1
  73. data/lib/rubocop/cop/rspec/receive_counts.rb +1 -1
  74. data/lib/rubocop/cop/rspec/receive_never.rb +2 -2
  75. data/lib/rubocop/cop/rspec/repeated_description.rb +1 -1
  76. data/lib/rubocop/cop/rspec/repeated_example.rb +2 -2
  77. data/lib/rubocop/cop/rspec/repeated_example_group_body.rb +1 -1
  78. data/lib/rubocop/cop/rspec/repeated_example_group_description.rb +1 -1
  79. data/lib/rubocop/cop/rspec/repeated_include_example.rb +103 -0
  80. data/lib/rubocop/cop/rspec/return_from_stub.rb +1 -1
  81. data/lib/rubocop/cop/rspec/scattered_let.rb +1 -1
  82. data/lib/rubocop/cop/rspec/scattered_setup.rb +1 -1
  83. data/lib/rubocop/cop/rspec/shared_context.rb +1 -1
  84. data/lib/rubocop/cop/rspec/shared_examples.rb +1 -1
  85. data/lib/rubocop/cop/rspec/single_argument_message_chain.rb +1 -1
  86. data/lib/rubocop/cop/rspec/stubbed_mock.rb +172 -0
  87. data/lib/rubocop/cop/rspec/subject_stub.rb +6 -6
  88. data/lib/rubocop/cop/rspec/unspecified_exception.rb +1 -1
  89. data/lib/rubocop/cop/rspec/variable_definition.rb +6 -6
  90. data/lib/rubocop/cop/rspec/variable_name.rb +28 -9
  91. data/lib/rubocop/cop/rspec/verified_doubles.rb +1 -1
  92. data/lib/rubocop/cop/rspec/void_expect.rb +1 -1
  93. data/lib/rubocop/cop/rspec/yield.rb +1 -1
  94. data/lib/rubocop/cop/rspec_cops.rb +3 -0
  95. data/lib/rubocop/rspec/corrector/move_node.rb +7 -5
  96. data/lib/rubocop/rspec/description_extractor.rb +1 -1
  97. data/lib/rubocop/rspec/{blank_line_separation.rb → empty_line_separation.rb} +13 -2
  98. data/lib/rubocop/rspec/example_group.rb +2 -2
  99. data/lib/rubocop/rspec/hook.rb +1 -5
  100. data/lib/rubocop/rspec/language.rb +12 -5
  101. data/lib/rubocop/rspec/language/node_pattern.rb +6 -1
  102. data/lib/rubocop/rspec/top_level_describe.rb +2 -2
  103. data/lib/rubocop/rspec/top_level_group.rb +26 -13
  104. data/lib/rubocop/rspec/variable.rb +1 -1
  105. data/lib/rubocop/rspec/version.rb +1 -1
  106. metadata +38 -6
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.42.0
4
+ version: 1.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Backus
@@ -10,22 +10,36 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-07-09 00:00:00.000000000 Z
13
+ date: 2020-10-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '0.87'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '0.87'
29
+ - !ruby/object:Gem::Dependency
30
+ name: rubocop-ast
17
31
  requirement: !ruby/object:Gem::Requirement
18
32
  requirements:
19
33
  - - ">="
20
34
  - !ruby/object:Gem::Version
21
- version: 0.87.0
35
+ version: 0.7.1
22
36
  type: :runtime
23
37
  prerelease: false
24
38
  version_requirements: !ruby/object:Gem::Requirement
25
39
  requirements:
26
40
  - - ">="
27
41
  - !ruby/object:Gem::Version
28
- version: 0.87.0
42
+ version: 0.7.1
29
43
  - !ruby/object:Gem::Dependency
30
44
  name: rack
31
45
  requirement: !ruby/object:Gem::Requirement
@@ -68,6 +82,20 @@ dependencies:
68
82
  - - ">="
69
83
  - !ruby/object:Gem::Version
70
84
  version: '3.4'
85
+ - !ruby/object:Gem::Dependency
86
+ name: rubocop-performance
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '1.7'
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: '1.7'
71
99
  - !ruby/object:Gem::Dependency
72
100
  name: simplecov
73
101
  requirement: !ruby/object:Gem::Requirement
@@ -119,6 +147,7 @@ files:
119
147
  - lib/rubocop/cop/rspec/align_right_let_brace.rb
120
148
  - lib/rubocop/cop/rspec/any_instance.rb
121
149
  - lib/rubocop/cop/rspec/around_block.rb
150
+ - lib/rubocop/cop/rspec/base.rb
122
151
  - lib/rubocop/cop/rspec/be.rb
123
152
  - lib/rubocop/cop/rspec/be_eql.rb
124
153
  - lib/rubocop/cop/rspec/before_after_all.rb
@@ -173,6 +202,7 @@ files:
173
202
  - lib/rubocop/cop/rspec/missing_example_group_argument.rb
174
203
  - lib/rubocop/cop/rspec/multiple_describes.rb
175
204
  - lib/rubocop/cop/rspec/multiple_expectations.rb
205
+ - lib/rubocop/cop/rspec/multiple_memoized_helpers.rb
176
206
  - lib/rubocop/cop/rspec/multiple_subjects.rb
177
207
  - lib/rubocop/cop/rspec/named_subject.rb
178
208
  - lib/rubocop/cop/rspec/nested_groups.rb
@@ -187,12 +217,14 @@ files:
187
217
  - lib/rubocop/cop/rspec/repeated_example.rb
188
218
  - lib/rubocop/cop/rspec/repeated_example_group_body.rb
189
219
  - lib/rubocop/cop/rspec/repeated_example_group_description.rb
220
+ - lib/rubocop/cop/rspec/repeated_include_example.rb
190
221
  - lib/rubocop/cop/rspec/return_from_stub.rb
191
222
  - lib/rubocop/cop/rspec/scattered_let.rb
192
223
  - lib/rubocop/cop/rspec/scattered_setup.rb
193
224
  - lib/rubocop/cop/rspec/shared_context.rb
194
225
  - lib/rubocop/cop/rspec/shared_examples.rb
195
226
  - lib/rubocop/cop/rspec/single_argument_message_chain.rb
227
+ - lib/rubocop/cop/rspec/stubbed_mock.rb
196
228
  - lib/rubocop/cop/rspec/subject_stub.rb
197
229
  - lib/rubocop/cop/rspec/unspecified_exception.rb
198
230
  - lib/rubocop/cop/rspec/variable_definition.rb
@@ -203,11 +235,11 @@ files:
203
235
  - lib/rubocop/cop/rspec_cops.rb
204
236
  - lib/rubocop/rspec.rb
205
237
  - lib/rubocop/rspec/align_let_brace.rb
206
- - lib/rubocop/rspec/blank_line_separation.rb
207
238
  - lib/rubocop/rspec/concept.rb
208
239
  - lib/rubocop/rspec/config_formatter.rb
209
240
  - lib/rubocop/rspec/corrector/move_node.rb
210
241
  - lib/rubocop/rspec/description_extractor.rb
242
+ - lib/rubocop/rspec/empty_line_separation.rb
211
243
  - lib/rubocop/rspec/example.rb
212
244
  - lib/rubocop/rspec/example_group.rb
213
245
  - lib/rubocop/rspec/factory_bot.rb
@@ -227,7 +259,7 @@ licenses:
227
259
  - MIT
228
260
  metadata:
229
261
  changelog_uri: https://github.com/rubocop-hq/rubocop-rspec/blob/master/CHANGELOG.md
230
- documentation_uri: https://rubocop-rspec.readthedocs.io/
262
+ documentation_uri: https://docs.rubocop.org/rubocop-rspec/
231
263
  post_install_message:
232
264
  rdoc_options: []
233
265
  require_paths: