rubocop-rspec 1.7.0 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +955 -79
  3. data/CODE_OF_CONDUCT.md +17 -0
  4. data/MIT-LICENSE.md +1 -2
  5. data/README.md +35 -35
  6. data/config/default.yml +940 -52
  7. data/config/obsoletion.yml +30 -0
  8. data/lib/rubocop/cop/rspec/align_left_let_brace.rb +49 -0
  9. data/lib/rubocop/cop/rspec/align_right_let_brace.rb +49 -0
  10. data/lib/rubocop/cop/rspec/any_instance.rb +10 -13
  11. data/lib/rubocop/cop/rspec/around_block.rb +97 -0
  12. data/lib/rubocop/cop/rspec/base.rb +26 -0
  13. data/lib/rubocop/cop/rspec/be.rb +39 -0
  14. data/lib/rubocop/cop/rspec/be_empty.rb +45 -0
  15. data/lib/rubocop/cop/rspec/be_eq.rb +47 -0
  16. data/lib/rubocop/cop/rspec/be_eql.rb +18 -15
  17. data/lib/rubocop/cop/rspec/be_nil.rb +74 -0
  18. data/lib/rubocop/cop/rspec/before_after_all.rb +45 -0
  19. data/lib/rubocop/cop/rspec/change_by_zero.rb +184 -0
  20. data/lib/rubocop/cop/rspec/class_check.rb +101 -0
  21. data/lib/rubocop/cop/rspec/contain_exactly.rb +56 -0
  22. data/lib/rubocop/cop/rspec/context_method.rb +57 -0
  23. data/lib/rubocop/cop/rspec/context_wording.rb +117 -0
  24. data/lib/rubocop/cop/rspec/describe_class.rb +52 -21
  25. data/lib/rubocop/cop/rspec/describe_method.rb +26 -11
  26. data/lib/rubocop/cop/rspec/describe_symbol.rb +37 -0
  27. data/lib/rubocop/cop/rspec/described_class.rb +181 -34
  28. data/lib/rubocop/cop/rspec/described_class_module_wrapping.rb +38 -0
  29. data/lib/rubocop/cop/rspec/dialect.rb +84 -0
  30. data/lib/rubocop/cop/rspec/duplicated_metadata.rb +58 -0
  31. data/lib/rubocop/cop/rspec/empty_example_group.rb +134 -47
  32. data/lib/rubocop/cop/rspec/empty_hook.rb +49 -0
  33. data/lib/rubocop/cop/rspec/empty_line_after_example.rb +82 -0
  34. data/lib/rubocop/cop/rspec/empty_line_after_example_group.rb +42 -0
  35. data/lib/rubocop/cop/rspec/empty_line_after_final_let.rb +40 -0
  36. data/lib/rubocop/cop/rspec/empty_line_after_hook.rb +82 -0
  37. data/lib/rubocop/cop/rspec/empty_line_after_subject.rb +36 -0
  38. data/lib/rubocop/cop/rspec/empty_metadata.rb +46 -0
  39. data/lib/rubocop/cop/rspec/empty_output.rb +47 -0
  40. data/lib/rubocop/cop/rspec/eq.rb +47 -0
  41. data/lib/rubocop/cop/rspec/example_length.rb +38 -20
  42. data/lib/rubocop/cop/rspec/example_without_description.rb +98 -0
  43. data/lib/rubocop/cop/rspec/example_wording.rb +117 -27
  44. data/lib/rubocop/cop/rspec/excessive_docstring_spacing.rb +110 -0
  45. data/lib/rubocop/cop/rspec/expect_actual.rb +46 -20
  46. data/lib/rubocop/cop/rspec/expect_change.rb +86 -0
  47. data/lib/rubocop/cop/rspec/expect_in_hook.rb +50 -0
  48. data/lib/rubocop/cop/rspec/expect_in_let.rb +42 -0
  49. data/lib/rubocop/cop/rspec/expect_output.rb +50 -0
  50. data/lib/rubocop/cop/rspec/focus.rb +79 -25
  51. data/lib/rubocop/cop/rspec/hook_argument.rb +48 -36
  52. data/lib/rubocop/cop/rspec/hooks_before_examples.rb +81 -0
  53. data/lib/rubocop/cop/rspec/identical_equality_assertion.rb +37 -0
  54. data/lib/rubocop/cop/rspec/implicit_block_expectation.rb +68 -0
  55. data/lib/rubocop/cop/rspec/implicit_expect.rb +100 -0
  56. data/lib/rubocop/cop/rspec/implicit_subject.rb +167 -0
  57. data/lib/rubocop/cop/rspec/indexed_let.rb +112 -0
  58. data/lib/rubocop/cop/rspec/instance_spy.rb +74 -0
  59. data/lib/rubocop/cop/rspec/instance_variable.rb +28 -14
  60. data/lib/rubocop/cop/rspec/is_expected_specify.rb +45 -0
  61. data/lib/rubocop/cop/rspec/it_behaves_like.rb +49 -0
  62. data/lib/rubocop/cop/rspec/iterated_expectation.rb +74 -0
  63. data/lib/rubocop/cop/rspec/leading_subject.rb +57 -29
  64. data/lib/rubocop/cop/rspec/leaky_constant_declaration.rb +127 -0
  65. data/lib/rubocop/cop/rspec/let_before_examples.rb +101 -0
  66. data/lib/rubocop/cop/rspec/let_setup.rb +32 -16
  67. data/lib/rubocop/cop/rspec/match_array.rb +59 -0
  68. data/lib/rubocop/cop/rspec/message_chain.rb +10 -15
  69. data/lib/rubocop/cop/rspec/message_expectation.rb +12 -9
  70. data/lib/rubocop/cop/rspec/message_spies.rb +88 -0
  71. data/lib/rubocop/cop/rspec/metadata_style.rb +202 -0
  72. data/lib/rubocop/cop/rspec/missing_example_group_argument.rb +35 -0
  73. data/lib/rubocop/cop/rspec/missing_expectation_target_method.rb +54 -0
  74. data/lib/rubocop/cop/rspec/mixin/comments_help.rb +38 -0
  75. data/lib/rubocop/cop/rspec/mixin/empty_line_separation.rb +59 -0
  76. data/lib/rubocop/cop/rspec/mixin/file_help.rb +14 -0
  77. data/lib/rubocop/cop/rspec/mixin/final_end_location.rb +19 -0
  78. data/lib/rubocop/cop/rspec/mixin/inside_example_group.rb +29 -0
  79. data/lib/rubocop/cop/rspec/mixin/location_help.rb +37 -0
  80. data/lib/rubocop/cop/rspec/mixin/metadata.rb +63 -0
  81. data/lib/rubocop/cop/rspec/mixin/namespace.rb +23 -0
  82. data/lib/rubocop/cop/rspec/mixin/skip_or_pending.rb +39 -0
  83. data/lib/rubocop/cop/rspec/mixin/top_level_group.rb +54 -0
  84. data/lib/rubocop/cop/rspec/mixin/variable.rb +21 -0
  85. data/lib/rubocop/cop/rspec/multiple_describes.rb +14 -12
  86. data/lib/rubocop/cop/rspec/multiple_expectations.rb +86 -26
  87. data/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb +146 -0
  88. data/lib/rubocop/cop/rspec/multiple_subjects.rb +97 -0
  89. data/lib/rubocop/cop/rspec/named_subject.rb +107 -27
  90. data/lib/rubocop/cop/rspec/nested_groups.rb +84 -47
  91. data/lib/rubocop/cop/rspec/no_expectation_example.rb +102 -0
  92. data/lib/rubocop/cop/rspec/not_to_not.rb +30 -27
  93. data/lib/rubocop/cop/rspec/overwriting_setup.rb +74 -0
  94. data/lib/rubocop/cop/rspec/pending.rb +80 -0
  95. data/lib/rubocop/cop/rspec/pending_without_reason.rb +159 -0
  96. data/lib/rubocop/cop/rspec/predicate_matcher.rb +341 -0
  97. data/lib/rubocop/cop/rspec/receive_counts.rb +89 -0
  98. data/lib/rubocop/cop/rspec/receive_messages.rb +161 -0
  99. data/lib/rubocop/cop/rspec/receive_never.rb +41 -0
  100. data/lib/rubocop/cop/rspec/redundant_around.rb +65 -0
  101. data/lib/rubocop/cop/rspec/redundant_predicate_matcher.rb +67 -0
  102. data/lib/rubocop/cop/rspec/remove_const.rb +39 -0
  103. data/lib/rubocop/cop/rspec/repeated_description.rb +98 -0
  104. data/lib/rubocop/cop/rspec/repeated_example.rb +53 -0
  105. data/lib/rubocop/cop/rspec/repeated_example_group_body.rb +100 -0
  106. data/lib/rubocop/cop/rspec/repeated_example_group_description.rb +96 -0
  107. data/lib/rubocop/cop/rspec/repeated_include_example.rb +105 -0
  108. data/lib/rubocop/cop/rspec/repeated_subject_call.rb +125 -0
  109. data/lib/rubocop/cop/rspec/return_from_stub.rb +169 -0
  110. data/lib/rubocop/cop/rspec/scattered_let.rb +59 -0
  111. data/lib/rubocop/cop/rspec/scattered_setup.rb +92 -0
  112. data/lib/rubocop/cop/rspec/shared_context.rb +107 -0
  113. data/lib/rubocop/cop/rspec/shared_examples.rb +125 -0
  114. data/lib/rubocop/cop/rspec/single_argument_message_chain.rb +93 -0
  115. data/lib/rubocop/cop/rspec/skip_block_inside_example.rb +46 -0
  116. data/lib/rubocop/cop/rspec/sort_metadata.rb +71 -0
  117. data/lib/rubocop/cop/rspec/spec_file_path_format.rb +133 -0
  118. data/lib/rubocop/cop/rspec/spec_file_path_suffix.rb +40 -0
  119. data/lib/rubocop/cop/rspec/stubbed_mock.rb +176 -0
  120. data/lib/rubocop/cop/rspec/subject_declaration.rb +46 -0
  121. data/lib/rubocop/cop/rspec/subject_stub.rb +93 -74
  122. data/lib/rubocop/cop/rspec/undescriptive_literals_description.rb +69 -0
  123. data/lib/rubocop/cop/rspec/unspecified_exception.rb +67 -0
  124. data/lib/rubocop/cop/rspec/variable_definition.rb +77 -0
  125. data/lib/rubocop/cop/rspec/variable_name.rb +68 -0
  126. data/lib/rubocop/cop/rspec/verified_double_reference.rb +111 -0
  127. data/lib/rubocop/cop/rspec/verified_doubles.rb +28 -14
  128. data/lib/rubocop/cop/rspec/void_expect.rb +60 -0
  129. data/lib/rubocop/cop/rspec/yield.rb +82 -0
  130. data/lib/rubocop/cop/rspec_cops.rb +112 -0
  131. data/lib/rubocop/rspec/align_let_brace.rb +63 -0
  132. data/lib/rubocop/rspec/concept.rb +33 -0
  133. data/lib/rubocop/rspec/config_formatter.rb +27 -4
  134. data/lib/rubocop/rspec/cop/generator.rb +25 -0
  135. data/lib/rubocop/rspec/corrector/move_node.rb +51 -0
  136. data/lib/rubocop/rspec/description_extractor.rb +60 -18
  137. data/lib/rubocop/rspec/example.rb +37 -0
  138. data/lib/rubocop/rspec/example_group.rb +67 -0
  139. data/lib/rubocop/rspec/hook.rb +79 -0
  140. data/lib/rubocop/rspec/inject.rb +3 -1
  141. data/lib/rubocop/rspec/language.rb +184 -41
  142. data/lib/rubocop/rspec/node.rb +19 -0
  143. data/lib/rubocop/rspec/shared_contexts/default_rspec_language_config_context.rb +29 -0
  144. data/lib/rubocop/rspec/version.rb +1 -1
  145. data/lib/rubocop/rspec/wording.rb +61 -19
  146. data/lib/rubocop/rspec.rb +6 -2
  147. data/lib/rubocop-rspec.rb +45 -34
  148. metadata +130 -195
  149. data/Gemfile +0 -13
  150. data/Rakefile +0 -48
  151. data/lib/rubocop/cop/rspec/file_path.rb +0 -83
  152. data/lib/rubocop/rspec/language/node_pattern.rb +0 -16
  153. data/lib/rubocop/rspec/spec_only.rb +0 -61
  154. data/lib/rubocop/rspec/top_level_describe.rb +0 -61
  155. data/lib/rubocop/rspec/util.rb +0 -19
  156. data/rubocop-rspec.gemspec +0 -42
  157. data/spec/expect_violation/expectation_spec.rb +0 -85
  158. data/spec/project/changelog_spec.rb +0 -81
  159. data/spec/project/default_config_spec.rb +0 -52
  160. data/spec/project/project_requires_spec.rb +0 -8
  161. data/spec/rubocop/cop/rspec/any_instance_spec.rb +0 -30
  162. data/spec/rubocop/cop/rspec/be_eql_spec.rb +0 -59
  163. data/spec/rubocop/cop/rspec/describe_class_spec.rb +0 -113
  164. data/spec/rubocop/cop/rspec/describe_method_spec.rb +0 -32
  165. data/spec/rubocop/cop/rspec/described_class_spec.rb +0 -219
  166. data/spec/rubocop/cop/rspec/empty_example_group_spec.rb +0 -79
  167. data/spec/rubocop/cop/rspec/example_length_spec.rb +0 -117
  168. data/spec/rubocop/cop/rspec/example_wording_spec.rb +0 -82
  169. data/spec/rubocop/cop/rspec/expect_actual_spec.rb +0 -136
  170. data/spec/rubocop/cop/rspec/file_path_spec.rb +0 -236
  171. data/spec/rubocop/cop/rspec/focus_spec.rb +0 -130
  172. data/spec/rubocop/cop/rspec/hook_argument_spec.rb +0 -189
  173. data/spec/rubocop/cop/rspec/instance_variable_spec.rb +0 -75
  174. data/spec/rubocop/cop/rspec/leading_subject_spec.rb +0 -54
  175. data/spec/rubocop/cop/rspec/let_setup_spec.rb +0 -66
  176. data/spec/rubocop/cop/rspec/message_chain_spec.rb +0 -21
  177. data/spec/rubocop/cop/rspec/message_expectation_spec.rb +0 -63
  178. data/spec/rubocop/cop/rspec/multiple_describes_spec.rb +0 -28
  179. data/spec/rubocop/cop/rspec/multiple_expectations_spec.rb +0 -84
  180. data/spec/rubocop/cop/rspec/named_subject_spec.rb +0 -62
  181. data/spec/rubocop/cop/rspec/nested_groups_spec.rb +0 -55
  182. data/spec/rubocop/cop/rspec/not_to_not_spec.rb +0 -57
  183. data/spec/rubocop/cop/rspec/subject_stub_spec.rb +0 -183
  184. data/spec/rubocop/cop/rspec/verified_doubles_spec.rb +0 -71
  185. data/spec/rubocop/rspec/config_formatter_spec.rb +0 -48
  186. data/spec/rubocop/rspec/description_extractor_spec.rb +0 -35
  187. data/spec/rubocop/rspec/language/selector_set_spec.rb +0 -29
  188. data/spec/rubocop/rspec/spec_only_spec.rb +0 -97
  189. data/spec/rubocop/rspec/util/one_spec.rb +0 -21
  190. data/spec/rubocop/rspec/wording_spec.rb +0 -44
  191. data/spec/shared/rspec_only_cop_behavior.rb +0 -68
  192. data/spec/spec_helper.rb +0 -41
  193. data/spec/support/expect_violation.rb +0 -166
data/CHANGELOG.md CHANGED
@@ -1,143 +1,1019 @@
1
- # Change log
1
+ # Changelog
2
2
 
3
- ## Master (unreleased)
3
+ ## Master (Unreleased)
4
+
5
+ ## 3.0.2 (2024-07-02)
6
+
7
+ - Fix wrong autocorrect for `RSpec/ScatteredSetup` when hook contains heredoc. ([@earlopain])
8
+ - Fix false negative for `RSpec/PredicateMatcher` when expectation contains custom failure message. ([@earlopain])
9
+ - Facilitate the 3.0 upgrade flow with proper extracted cop messages. ([@jeppester])
10
+
11
+ ## 3.0.1 (2024-06-11)
12
+
13
+ - Bump RuboCop requirement to +1.61. ([@ydah])
14
+
15
+ ## 3.0.0 (2024-06-11)
16
+
17
+ - Remove extracted cops in `Capybara`, `FactoryBot` and `Rails` departments. ([@ydah])
18
+ - Remove `RuboCop::RSpec::Language::NodePattern`. ([@ydah])
19
+ - Remove `RSpec/FilePath` cop. ([@ydah])
20
+ - Remove `RSpec/Capybara/FeatureMethods` cop. If you are using this cop, change it to use `RSpec/Dialect`. ([@ydah])
21
+ - Add new `RSpec/MissingExpectationTargetMethod` cop. ([@krororo])
22
+ - Fix an error for `RSpec/ScatteredSetup` when one of the hooks is an empty block. ([@earlopain])
23
+
24
+ These previously pending cops are now enabled by default: `RSpec/BeEmpty`, `RSpec/BeEq`, `RSpec/BeNil`, `RSpec/ChangeByZero`, `RSpec/ClassCheck`, `RSpec/ContainExactly`, `RSpec/DuplicatedMetadata`, `RSpec/EmptyMetadata`, `RSpec/EmptyOutput`, `RSpec/Eq`, `RSpec/ExcessiveDocstringSpacing`, `RSpec/ExpectInLet`, `RSpec/IdenticalEqualityAssertion`, `RSpec/IndexedLet`, `RSpec/IsExpectedSpecify`, `RSpec/MatchArray`, `RSpec/MetadataStyle`, `RSpec/NoExpectationExample`, `RSpec/PendingWithoutReason`, `RSpec/ReceiveMessages`, `RSpec/RedundantAround`, `RSpec/RedundantPredicateMatcher`, `RSpec/RemoveConst`, `RSpec/RepeatedSubjectCall`, `RSpec/SkipBlockInsideExample`, `RSpec/SortMetadata`, `RSpec/SpecFilePathFormat`, `RSpec/SpecFilePathSuffix`, `RSpec/SubjectDeclaration`, `RSpec/UndescriptiveLiteralsDescription`, and `RSpec/VerifiedDoubleReference`.
25
+
26
+ Read more about how to upgrade in https://docs.rubocop.org/rubocop-rspec/upgrade_to_version_3.html
27
+
28
+ ## 2.31.0 (2024-06-07)
29
+
30
+ - Support `AutoCorrect: contextual` option for LSP. ([@ydah])
31
+
32
+ ## 2.30.0 (2024-06-03)
33
+
34
+ - Add new `RSpec/ExpectInLet` cop. ([@yasu551])
35
+
36
+ ## 2.29.2 (2024-05-02)
37
+
38
+ - Fix beginless and endless range bug for RepeatedIncludeExample cop. ([@hasghari])
39
+ - Fix a false positive for `RSpec/RepeatedSubjectCall` when subject is used as argument to function call. ([@K-S-A])
40
+
41
+ ## 2.29.1 (2024-04-05)
42
+
43
+ - Fix an error in the default configuration. ([@ydah])
44
+
45
+ ## 2.29.0 (2024-04-04)
46
+
47
+ - Fix an autocorrect error for `RSpec/ExpectActual`. ([@bquorning])
48
+ - Add new `RSpec/UndescriptiveLiteralsDescription` cop. ([@ydah])
49
+ - Add new `RSpec/EmptyOutput` cop. ([@bquorning])
50
+
51
+ ## 2.28.0 (2024-03-30)
52
+
53
+ - Extract RSpec Rails cops to a separate repository, [`rubocop-rspec_rails`](https://github.com/rubocop/rubocop-rspec_rails). The `rubocop-rspec_rails` repository is a dependency of `rubocop-rspec` and the cops related to rspec-rails are aliased (`RSpec/Rails/Foo` == `RSpecRails/Foo`) until v3.0 is released, so the change will be invisible to users until then. ([@ydah])
54
+
55
+ ## 2.27.1 (2024-03-03)
56
+
57
+ - Fix a false positive for `RSpec/RepeatedSubjectCall` when `subject.method_call`. ([@ydah])
58
+ - Add configuration option `OnlyStaticConstants` to `RSpec/DescribedClass`. ([@ydah])
59
+
60
+ ## 2.27.0 (2024-03-01)
61
+
62
+ - Add new `RSpec/IsExpectedSpecify` cop. ([@ydah])
63
+ - Add new `RSpec/RepeatedSubjectCall` cop. ([@drcapulet])
64
+ - Add support for `assert_true`, `assert_false`, `assert_not_equal`, `assert_not_nil`, `*_empty`, `*_predicate`, `*_kind_of`, `*_in_delta`, `*_match`, `*_instance_of` and `*_includes` assertions in `RSpec/Rails/MinitestAssertions`. ([@ydah], [@G-Rath])
65
+ - Support asserts with messages in `Rspec/BeEmpty`. ([@G-Rath])
66
+ - Fix a false positive for `RSpec/ExpectActual` when used with rspec-rails routing matchers. ([@naveg])
67
+ - Add configuration option `ResponseMethods` to `RSpec/Rails/HaveHttpStatus`. ([@ydah])
68
+ - Fix a false negative for `RSpec/DescribedClass` when class with constant. ([@ydah])
69
+ - Fix a false positive for `RSpec/ExampleWithoutDescription` when `specify` with multi-line block and missing description. ([@ydah])
70
+ - Fix an incorrect autocorrect for `RSpec/ChangeByZero` when compound expectations with line break before `.by(0)`. ([@ydah])
71
+
72
+ ## 2.26.1 (2024-01-05)
73
+
74
+ - Fix an error for `RSpec/SharedExamples` when using examples without argument. ([@ydah])
75
+
76
+ ## 2.26.0 (2024-01-04)
77
+
78
+ - Add new `RSpec/RedundantPredicateMatcher` cop. ([@ydah])
79
+ - Add new `RSpec/RemoveConst` cop. ([@swelther])
80
+ - Add support for correcting "it will" (future tense) for `RSpec/ExampleWording`. ([@jdufresne])
81
+ - Add support for `symbol` style for `RSpec/SharedExamples`. ([@jessieay])
82
+ - Ensure `PendingWithoutReason` can detect violations inside shared groups. ([@robinaugh])
83
+
84
+ ## 2.25.0 (2023-10-27)
85
+
86
+ - Add support single quoted string and percent string and heredoc for `RSpec/Rails/HttpStatus`. ([@ydah])
87
+ - Change to be inline disable for `RSpec/SpecFilePathFormat` like `RSpec/FilePath`. ([@ydah])
88
+ - Fix a false positive for `RSpec/MetadataStyle` with example groups having multiple string arguments. ([@franzliedke])
89
+
90
+ ## 2.24.1 (2023-09-23)
91
+
92
+ - Fix an error when using `RSpec/FilePath` and revert to enabled by default. If you have already moved to `RSpec/SpecFilePathSuffix` and `RSpec/SpecFilePathFormat`, disable `RSpec/FilePath` explicitly as `Enabled: false`. The `RSpec/FilePath` before migration and the `RSpec/SpecFilePathSuffix` and `RSpec/SpecFilePathFormat` as the target are available respectively. ([@ydah])
93
+
94
+ ## 2.24.0 (2023-09-08)
95
+
96
+ - Split `RSpec/FilePath` into `RSpec/SpecFilePathSuffix` and `RSpec/SpecFilePathFormat`. `RSpec/FilePath` cop is disabled by default and the two new cops are pending and need to be enabled explicitly. ([@ydah])
97
+ - Add new `RSpec/Eq` cop. ([@ydah])
98
+ - Add `RSpec/MetadataStyle` and `RSpec/EmptyMetadata` cops. ([@r7kamura])
99
+ - Add support `RSpec/Rails/HttpStatus` when `have_http_status` with string argument. ([@ydah])
100
+ - Fix an infinite loop error when `RSpec/ExcessiveDocstringSpacing` finds a description with non-ASCII leading/trailing whitespace. ([@bcgraham])
101
+ - Fix an incorrect autocorrect for `RSpec/ReceiveMessages` when return values declared between stubs. ([@marocchino])
102
+ - Fix a false positive `RSpec/Focus` when chained method call and inside define method. ([@ydah])
103
+
104
+ ## 2.23.2 (2023-08-09)
105
+
106
+ - Fix an incorrect autocorrect for `RSpec/ReceiveMessages` when method is only non-word character. ([@marocchino])
107
+ - Fix a false positive for `RSpec/ReceiveMessages` when return with splat. ([@marocchino])
108
+
109
+ ## 2.23.1 (2023-08-07)
110
+
111
+ - Mark to `Safe: false` for `RSpec/Rails/NegationBeValid` cop. ([@ydah])
112
+ - Declare autocorrect as unsafe for `RSpec/ReceiveMessages`. ([@bquorning])
113
+
114
+ ## 2.23.0 (2023-07-30)
115
+
116
+ - Add new `RSpec/Rails/NegationBeValid` cop. ([@ydah])
117
+ - Fix a false negative for `RSpec/ExcessiveDocstringSpacing` when finds description with em space. ([@ydah])
118
+ - Fix a false positive for `RSpec/EmptyExampleGroup` when example group with examples defined in `if` branch inside iterator. ([@ydah])
119
+ - Update the message output of `RSpec/ExpectActual` to include the word 'value'. ([@corydiamand])
120
+ - Fix a false negative for `RSpec/Pending` when `it` without body. ([@ydah])
121
+ - Add new `RSpec/ReceiveMessages` cop. ([@ydah])
122
+ - Change default.yml path to use `**/spec/*` instead of `spec/*`. ([@ydah])
123
+ - Add `AllowedIdentifiers` and `AllowedPatterns` configuration option to `RSpec/IndexedLet`. ([@ydah])
124
+ - Fix `RSpec/NamedSubject` when block has no body. ([@splattael])
125
+ - Fix `RSpec/LetBeforeExamples` autocorrect incompatible with `RSpec/ScatteredLet` autocorrect. ([@ydah])
126
+ - Update `RSpec/Focus` to support `shared_context` and `shared_examples`. ([@tmaier])
127
+
128
+ ## 2.22.0 (2023-05-06)
129
+
130
+ - Extract factory_bot cops to a separate repository, [`rubocop-factory_bot`](https://github.com/rubocop/rubocop-factory_bot). The `rubocop-factory_bot` repository is a dependency of `rubocop-rspec` and the factory_bot cops are aliased (`RSpec/FactoryBot/Foo` == `FactoryBot/Foo`) until v3.0 is released, so the change will be invisible to users until then. ([@ydah])
131
+
132
+ ## 2.21.0 (2023-05-05)
133
+
134
+ - Fix a false positive in `RSpec/IndexedLet` with suffixes after index-like numbers. ([@pirj])
135
+ - Fix an error for `RSpec/Rails/HaveHttpStatus` with comparison with strings containing non-numeric characters. ([@ydah])
136
+ - Fix an error for `RSpec/MatchArray` when `match_array` with no argument. ([@ydah])
137
+ - Add support `a_block_changing` and `changing` for `RSpec/ChangeByZero`. ([@ydah])
138
+ - Drop Ruby 2.6 support. ([@ydah])
139
+
140
+ ## 2.20.0 (2023-04-18)
141
+
142
+ - Add new `RSpec/IndexedLet` cop. ([@dmitrytsepelev])
143
+ - Add new `RSpec/BeEmpty` cop. ([@ydah], [@bquorning])
144
+ - Add autocorrect support for `RSpec/ScatteredSetup`. ([@ydah])
145
+ - Add support `be_status` style for `RSpec/Rails/HttpStatus`. ([@ydah])
146
+ - Add support for shared example groups to `RSpec/EmptyLineAfterExampleGroup`. ([@pirj])
147
+ - Add support for `RSpec/HaveHttpStatus` when using `response.code`. ([@ydah])
148
+ - Fix order of expected and actual in correction for `RSpec/Rails/MinitestAssertions`. ([@mvz])
149
+ - Fix a false positive for `RSpec/DescribedClassModuleWrapping` when RSpec.describe numblock is nested within a module. ([@ydah])
150
+ - Fix a false positive for `RSpec/FactoryBot/ConsistentParenthesesStyle` inside `&&`, `||` and `:?` when `omit_parentheses` is on. ([@dmitrytsepelev])
151
+ - Fix a false positive for `RSpec/PendingWithoutReason` when pending/skip has a reason inside an example group. ([@ydah])
152
+ - Fix a false negative for `RSpec/RedundantAround` when redundant numblock `around`. ([@ydah])
153
+ - Change `RSpec/ContainExactly` to ignore calls with no arguments, and change `RSpec/MatchArray` to ignore calls with an empty array literal argument. ([@ydah], [@bquorning])
154
+ - Make `RSpec/MatchArray` and `RSpec/ContainExactly` pending. ([@ydah])
155
+
156
+ ## 2.19.0 (2023-03-06)
157
+
158
+ - Fix a false positive for `RSpec/ContextWording` when context is interpolated string literal or execute string. ([@ydah])
159
+ - Fix a false positive for `RSpec/DescribeMethod` when multi-line describe without `#` and `.` at the beginning. ([@ydah], [@pirj])
160
+ - Fix a false positive for `RSpec/VariableName` when inside non-spec code. ([@ydah])
161
+ - Fix a false positive for `RSpec/VariableDefinition` when inside non-spec code. ([@ydah])
162
+ - Add new `RSpec/PendingBlockInsideExample` cop. ([@ydah])
163
+ - Add `RSpec/RedundantAround` cop. ([@r7kamura])
164
+ - Add `RSpec/Rails/TravelAround` cop. ([@r7kamura])
165
+ - Add `RSpec/ContainExactly` and `RSpec/MatchArray` cops. ([@faucct])
166
+ - Fix a false positive for `RSpec/PendingWithoutReason` when not inside example and pending/skip with block. ([@ydah], [@pirj])
167
+ - Fix a false positive for `RSpec/PendingWithoutReason` when `skip` is passed a block inside example. ([@ydah], [@pirj])
168
+ - Rename `RSpec/PendingBlockInsideExample` cop to `RSpec/SkipBlockInsideExample`. ([@pirj])
169
+ - Deprecate `send_pattern`/`block_pattern`/`numblock_pattern` helpers in favour of using node pattern explicitly. ([@pirj], [@ydah])
170
+ - Fix an incorrect autocorrect for `RSpec/VerifiedDoubleReference` when namespaced class. ([@ydah])
171
+
172
+ ## 2.18.1 (2023-01-19)
173
+
174
+ - Add `rubocop-capybara` version constraint to prevent sudden cop enabling when it hits 3.0. ([@pirj])
175
+
176
+ ## 2.18.0 (2023-01-16)
177
+
178
+ - Extract Capybara cops to a separate repository, [`rubocop-capybara`](https://github.com/rubocop/rubocop-capybara). The `rubocop-capybara` repository is a dependency of `rubocop-rspec` and the Capybara cops are aliased (`RSpec/Capybara/Foo` == `Capybara/Foo`) until v3.0 is released, so the change will be invisible to users until then. ([@pirj])
179
+
180
+ ## 2.17.1 (2023-01-16)
181
+
182
+ - Fix a false negative for `RSpec/Pending` when using skipped in metadata is multiline string. ([@ydah])
183
+ - Fix a false positive for `RSpec/NoExpectationExample` when using skipped in metadata is multiline string. ([@ydah])
184
+ - Fix a false positive for `RSpec/ContextMethod` when multi-line context with `#` at the beginning. ([@ydah])
185
+ - Fix an incorrect autocorrect for `RSpec/PredicateMatcher` when multiline expect and predicate method with heredoc. ([@ydah])
186
+ - Fix a false positive for `RSpec/PredicateMatcher` when `include` with multiple argument. ([@ydah])
187
+
188
+ ## 2.17.0 (2023-01-13)
189
+
190
+ - Fix a false positive for `RSpec/PendingWithoutReason` when pending/skip is argument of methods. ([@ydah])
191
+ - Add new `RSpec/Capybara/MatchStyle` cop. ([@ydah])
192
+ - Add new `RSpec/Rails/MinitestAssertions` cop. ([@ydah])
193
+ - Fix a false positive for `RSpec/PendingWithoutReason` when not inside example. ([@ydah])
194
+ - Fix a false negative for `RSpec/PredicateMatcher` when using `include` and `respond_to`. ([@ydah])
195
+ - Fix a false positive for `RSpec/StubbedMock` when stubbed message expectation with a block and block parameter. ([@ydah])
196
+
197
+ ## 2.16.0 (2022-12-13)
198
+
199
+ - Add new `RSpec/FactoryBot/FactoryNameStyle` cop. ([@ydah])
200
+ - Improved processing speed for `RSpec/Be`, `RSpec/ExpectActual`, `RSpec/ImplicitExpect`, `RSpec/MessageSpies`, `RSpec/PredicateMatcher` and `RSpec/Rails/HaveHttpStatus`. ([@ydah])
201
+ - Fix wrong autocorrection in `n_times` style on `RSpec/FactoryBot/CreateList`. ([@r7kamura])
202
+ - Fix a false positive for `RSpec/FactoryBot/ConsistentParenthesesStyle` when using `generate` with multiple arguments. ([@ydah])
203
+ - Mark `RSpec/BeEq` as `Safe: false`. ([@r7kamura])
204
+ - Add `RSpec/DuplicatedMetadata` cop. ([@r7kamura])
205
+ - Mark `RSpec/BeEql` as `Safe: false`. ([@r7kamura])
206
+ - Add `RSpec/PendingWithoutReason` cop. ([@r7kamura])
207
+
208
+ ## 2.15.0 (2022-11-03)
209
+
210
+ - Fix a false positive for `RSpec/RepeatedDescription` when different its block expectations are used. ([@ydah])
211
+ - Add `named_only` style to `RSpec/NamedSubject`. ([@kuahyeow])
212
+ - Fix `RSpec/FactoryBot/ConsistentParenthesesStyle` to ignore calls without the first positional argument. ([@pirj])
213
+ - Fix `RSpec/FactoryBot/ConsistentParenthesesStyle` to ignore calls inside a Hash or an Array. ([@pirj])
214
+ - Fix `RSpec/NestedGroups` to correctly use `AllowedGroups` config. ([@samrjenkins])
215
+ - Remove `Runners` and `HookScopes` RSpec DSL elements from configuration. ([@pirj])
216
+ - Add `with default RSpec/Language config` helper to `lib` (under `rubocop/rspec/shared_contexts/default_rspec_language_config_context`), to allow use for downstream cops based on `RuboCop::Cop::RSpec::Base`. ([@smcgivern])
217
+
218
+ ## 2.14.2 (2022-10-25)
219
+
220
+ - Fix an incorrect autocorrect for `FactoryBot/ConsistentParenthesesStyle` with `omit_parentheses` option when method name and first argument are not on same line. ([@ydah])
221
+ - Fix autocorrection loop in `RSpec/ExampleWording` for insufficient example wording. ([@pirj])
222
+ - Fix `RSpec/SortMetadata` not to reorder arguments of `include_`/`it_behaves_like`. ([@pirj])
223
+ - Fix a false positive for `RSpec/NoExpectationExample` when allowed pattern methods with arguments. ([@ydah])
224
+ - Change `RSpec/FilePath` so that it only checks suffix when path is under spec/routing or type is defined as routing. ([@r7kamura])
225
+
226
+ ## 2.14.1 (2022-10-24)
227
+
228
+ - Fix an error for `RSpec/Rails/InferredSpecType` with redundant type before other Hash metadata. ([@ydah])
229
+
230
+ ## 2.14.0 (2022-10-23)
231
+
232
+ - Add `require_implicit` style to `RSpec/ImplicitSubject`. ([@r7kamura])
233
+ - Fix a false positive for `RSpec/Capybara/SpecificMatcher` when `have_css("a")` without attribute. ([@ydah])
234
+ - Update `RSpec/ExampleWording` cop to raise error for insufficient descriptions. ([@akrox58])
235
+ - Add new `RSpec/Capybara/NegationMatcher` cop. ([@ydah])
236
+ - Add `AllowedPatterns` configuration option to `RSpec/NoExpectationExample`. ([@ydah])
237
+ - Improve `RSpec/NoExpectationExample` cop to ignore examples skipped or pending via metadata. ([@pirj])
238
+ - Add `RSpec/FactoryBot/ConsistentParenthesesStyle` cop. ([@Liberatys])
239
+ - Add `RSpec/Rails/InferredSpecType` cop. ([@r7kamura])
240
+ - Add new `RSpec/Capybara/SpecificActions` cop. ([@ydah])
241
+ - Update `config/default.yml` removing deprecated option to make the config correctable by users. ([@ignaciovillaverde])
242
+ - Do not attempt to auto-correct example groups with `include_examples` in `RSpec/LetBeforeExamples`. ([@pirj])
243
+ - Add new `RSpec/SortMetadata` cop. ([@leoarnold])
244
+ - Add support for subject! method to `RSpec/SubjectDeclaration`. ([@ydah])
245
+
246
+ ## 2.13.2 (2022-09-23)
247
+
248
+ - Fix an error for `RSpec/Capybara/SpecificFinders` with no parentheses. ([@ydah])
249
+ - Fix a false positive for `RSpec/NoExpectationExample` with pending using `skip` or `pending` inside an example. ([@ydah])
250
+ - Exclude `have_text` and `have_content` that raise `ArgumentError` with `RSpec/Capybara/VisibilityMatcher` where `:visible` is an invalid option. ([@ydah])
251
+ - Fix a false negative for `RSpec/Capybara/VisibilityMatcher` with negative matchers. ([@ydah])
252
+
253
+ ## 2.13.1 (2022-09-12)
254
+
255
+ - Include config/obsoletion.yml in the gemspec. ([@hosamaly])
256
+
257
+ ## 2.13.0 (2022-09-12)
258
+
259
+ - Fix `RSpec/FilePath` cop missing mismatched expanded namespace. ([@sl4vr])
260
+ - Add new `AllowConsecutiveOneLiners` (default true) option for `Rspec/EmptyLineAfterHook` cop. ([@ngouy])
261
+ - Add autocorrect support for `RSpec/EmptyExampleGroup`. ([@r7kamura])
262
+ - Fix `RSpec/ChangeByZero` with compound expressions using `&` or `|` operators. ([@BrianHawley])
263
+ - Add `RSpec/NoExpectationExample`. ([@r7kamura])
264
+ - Add some expectation methods to default configuration. ([@r7kamura])
265
+ - Fix a false positive for `RSpec/Capybara/SpecificMatcher`. ([@ydah])
266
+ - Fix a false negative for `RSpec/Capybara/SpecificMatcher` for `have_field`. ([@ydah])
267
+ - Fix a false positive for `RSpec/Capybara/SpecificMatcher` when may not have a `href` by `have_link`. ([@ydah])
268
+ - Add `NegatedMatcher` configuration option to `RSpec/ChangeByZero`. ([@ydah])
269
+ - Add new `RSpec/Capybara/SpecificFinders` cop. ([@ydah])
270
+ - Add support for numblocks to `RSpec/AroundBlock`, `RSpec/EmptyLineAfterHook`, `RSpec/ExpectInHook`, `RSpec/HookArgument`, `RSpec/HooksBeforeExamples`, `RSpec/IteratedExpectation`, and `RSpec/NoExpectationExample`. ([@ydah])
271
+ - Fix incorrect documentation URLs when using `rubocop --show-docs-url`. ([@r7kamura])
272
+ - Add `AllowedGroups` configuration option to `RSpec/NestedGroups`. ([@ydah])
273
+ - Deprecate `IgnoredPatterns` option in favor of the `AllowedPatterns` options. ([@ydah])
274
+ - Add `AllowedPatterns` configuration option to `RSpec/ContextWording`. ([@ydah])
275
+ - Add `RSpec/ClassCheck` cop. ([@r7kamura])
276
+ - Fix a false positive for `RSpec/Capybara/SpecificMatcher` when pseudo-classes. ([@ydah])
277
+ - Fix a false negative for `RSpec/SubjectStub` when the subject is declared with the `subject!` method and called by name. ([@eikes])
278
+ - Support `Array.new(n)` on `RSpec/FactoryBot/CreateList` cop. ([@r7kamura])
279
+
280
+ ## 2.12.1 (2022-07-03)
281
+
282
+ - Fix a false positive for `RSpec/Capybara/SpecificMatcher`. ([@ydah])
283
+
284
+ ## 2.12.0 (2022-07-02)
285
+
286
+ - Fix incorrect path suggested by `RSpec/FilePath` cop when second argument contains spaces. ([@tejasbubane])
287
+ - Fix autocorrect for EmptyLineSeparation. ([@johnny-miyake])
288
+ - Add new `RSpec/Capybara/SpecificMatcher` cop. ([@ydah])
289
+ - Fixed false offense detection in `FactoryBot/CreateList` when a n.times block is including method calls in the factory create arguments. ([@ngouy])
290
+ - Fix error in `RSpec/RSpec/FactoryBot/CreateList` cop for empty block. ([@tejasbubane])
291
+ - Update `RSpec/MultipleExpectations` cop documentation with examples of aggregate_failures use. ([@edgibbs])
292
+ - Declare autocorrect as unsafe for `RSpec/VerifiedDoubleReference`. ([@Drowze])
293
+ - Add new `RSpec/Rails/HaveHttpStatus` cop. ([@akiomik])
294
+
295
+ ## 2.11.1 (2022-05-18)
296
+
297
+ - Fix a regression in `RSpec/ExpectChange` flagging chained method calls. ([@pirj])
298
+
299
+ ## 2.11.0 (2022-05-18)
300
+
301
+ - Drop Ruby 2.5 support. ([@ydah])
302
+ - Add new `RSpec/ChangeByZero` cop. ([@ydah])
303
+ - Improve `RSpec/ExpectChange` to detect namespaced and top-level constants. ([@M-Yamashita01])
304
+ - Introduce an amendment to `Metrics/BlockLength` to exclude spec files. ([@luke-hill])
305
+
306
+ ## 2.10.0 (2022-04-19)
307
+
308
+ - Fix a false positive for `RSpec/EmptyExampleGroup` when expectations in case statement. ([@ydah])
309
+ - Add `RSpec/VerifiedDoubleReference` cop. ([@t3h2mas])
310
+ - Make `RSpec/BeNil` cop configurable with a `be_nil` style and a `be` style. ([@bquorning])
311
+ - Fix `Capybara/CurrentPathExpectation` autocorrect incompatible with `Style/TrailingCommaInArguments` autocorrect. ([@ydah])
312
+
313
+ ## 2.9.0 (2022-02-28)
314
+
315
+ - Add new `RSpec/BeNil` cop. ([@bquorning])
316
+ - Add new `RSpec/BeEq` cop. ([@bquorning])
317
+
318
+ ## 2.8.0 (2022-01-24)
319
+
320
+ - Fix `RSpec/FactoryBot/SyntaxMethods` and `RSpec/Capybara/FeatureMethods` to inspect shared groups. ([@pirj])
321
+ - Fix `RSpec/LeadingSubject` failure in non-spec code. ([@pirj])
322
+ - Add bad example to `RSpec/SubjectStub` cop. ([@oshiro3])
323
+ - Replace non-styleguide cops `StyleGuide` attribute with `Reference`. ([@pirj])
324
+ - Fix `RSpec/SubjectStub` to disallow stubbing of subjects defined in parent example groups. ([@pirj])
325
+
326
+ ## 2.7.0 (2021-12-26)
327
+
328
+ - Add new `RSpec/FactoryBot/SyntaxMethods` cop. ([@leoarnold])
329
+ - Exclude `task` type specs from `RSpec/DescribeClass` cop. ([@harry-graham])
330
+
331
+ ## 2.6.0 (2021-11-08)
332
+
333
+ - Fix merging RSpec DSL configuration from third-party gems. ([@pirj])
334
+ - Fix `RSpec/ExcessiveDocstringSpacing` false positive for multi-line indented strings. ([@G-Rath])
335
+ - Fix `Include` configuration for sub-departments. ([@pirj])
336
+ - Ignore heredocs in `RSpec/ExcessiveDocstringSpacing`. ([@G-Rath])
337
+ - Stop `RSpec/ExampleWording` from trying to correct heredocs. ([@G-Rath])
338
+ - Add autocorrect support for `RSpec/VariableDefinition`. ([@r7kamura])
339
+
340
+ ## 2.5.0 (2021-09-21)
341
+
342
+ - Declare autocorrect as unsafe for `ExpectChange`. ([@francois-ferrandis])
343
+ - Fix each example for `RSpec/HookArgument`. ([@lokhi])
344
+ - Exclude unrelated Rails directories from `RSpec/DescribeClass`. ([@MothOnMars])
345
+ - Add `RSpec/ExcessiveDocstringSpacing` cop. ([@G-Rath])
346
+ - Add `RSpec/SubjectDeclaration` cop. ([@dswij])
347
+ - Fix excessive whitespace removal in `RSpec/EmptyHook` autocorrection. ([@pirj])
348
+ - Bump RuboCop requirement to v1.19.0. ([@pirj])
349
+ - Fix false positive in `RSpec/IteratedExpectation` when there is single, non-expectation statement in the block body. ([@Darhazer])
350
+
351
+ ## 2.4.0 (2021-06-09)
352
+
353
+ - Update `RSpec/FilePath` to check suffix when given a non-constant top-level node (e.g. features). ([@topalovic])
354
+ - Add missing documentation for `single_statement_only` style of `RSpec/ImplicitSubject` cop. ([@tejasbubane])
355
+ - Fix an exception in `DescribedClass` when accessing a constant on a variable in a spec that is nested in a namespace. ([@rrosenblum])
356
+ - Add new `RSpec/IdenticalEqualityAssertion` cop. ([@tejasbubane])
357
+ - Add `RSpec/Rails/AvoidSetupHook` cop. ([@paydaylight])
358
+ - Fix false negative in `RSpec/ExpectChange` cop with block style and chained method call. ([@tejasbubane])
359
+
360
+ ## 2.3.0 (2021-04-28)
361
+
362
+ - Allow `RSpec/ContextWording` to accept multi-word prefixes. ([@hosamaly])
363
+ - Drop support for ruby 2.4. ([@bquorning])
364
+ - Add `CountAsOne` configuration option to `RSpec/ExampleLength`. ([@stephannv])
365
+ - Fix a false positive for `RSpec/RepeatedExampleGroupBody` when `pending` or `skip` have argument(s). ([@Tietew])
366
+
367
+ ## 2.2.0 (2021-02-02)
368
+
369
+ - Fix `HooksBeforeExamples`, `LeadingSubject`, `LetBeforeExamples` and `ScatteredLet` autocorrection to take into account inline comments and comments immediately before the moved node. ([@Darhazer])
370
+ - Improve rubocop-rspec performance. ([@Darhazer], [@bquorning])
371
+ - Include `Enabled: true` to prevent a mismatched configuration parameter warning when `RSpec` cops are explicitly enabled in the user configuration. ([@pirj])
372
+
373
+ ## 2.1.0 (2020-12-17)
374
+
375
+ - Fix `RSpec/FilePath` false positive for relative file path runs with long namespaces. ([@ahukkanen])
376
+ - Update `RSpec/Focus` to have auto-correction. ([@dvandersluis])
377
+
378
+ ## 2.0.1 (2020-12-02)
379
+
380
+ - Fixed infinite loop in `RSpec/ExpectActual` autocorrection when both expected and actual values are literals. ([@Darhazer])
381
+
382
+ ## 2.0.0 (2020-11-06)
383
+
384
+ - Remove deprecated class `::RuboCop::Cop::RSpec::Cop`. ([@bquorning])
385
+ - Retire `RSpec/InvalidPredicateMatcher` cop. ([@pirj])
386
+ - Remove the code responsible for filtering files to inspect. ([@pirj])
387
+ - Make RSpec language elements configurable. ([@sl4vr])
388
+ - Remove `CustomIncludeMethods` `RSpec/EmptyExampleGroup` option in favour of the new RSpec DSL configuration. ([@pirj])
389
+ - Enabled pending cop (`RSpec/StubbedMock`). ([@pirj])
390
+
391
+ ## 2.0.0.pre (2020-10-22)
392
+
393
+ - Update RuboCop dependency to v1.0.0. ([@bquorning])
394
+ - Change namespace of several cops (`Capybara/*` -> `RSpec/Capybara/*`, `FactoryBot/*` -> `RSpec/FactoryBot/*`, `Rails/*` -> `RSpec/Rails/*`). ([@pirj], [@bquorning])
395
+
396
+ ## 1.44.1 (2020-10-20)
397
+
398
+ - Relax `rubocop-ast` version constraint. ([@PhilCoggins])
399
+
400
+ ## 1.44.0 (2020-10-20)
401
+
402
+ - Move our documentation from rubocop-rspec.readthedocs.io to docs.rubocop.org/rubocop-rspec. ([@bquorning])
403
+ - Add `RSpec/RepeatedIncludeExample` cop. ([@biinari])
404
+ - Add `RSpec/StubbedMock` cop. ([@bquorning], [@pirj])
405
+ - Add `IgnoredMetadata` configuration option to `RSpec/DescribeClass`. ([@Rafix02])
406
+ - Fix false positives in `RSpec/EmptyExampleGroup`. ([@pirj])
407
+ - Fix a false positive for `RSpec/EmptyExampleGroup` when example is defined in an `if` branch. ([@koic])
408
+
409
+ ## 1.43.2 (2020-08-25)
410
+
411
+ - Fix `RSpec/FilePath` when checking a file with a shared example. ([@pirj])
412
+ - Fix subject nesting detection in `RSpec/LeadingSubject`. ([@pirj])
413
+
414
+ ## 1.43.1 (2020-08-17)
415
+
416
+ - Fix `RSpec/FilePath` when checking a file defining e.g. an empty class. ([@bquorning])
417
+
418
+ ## 1.43.0 (2020-08-17)
419
+
420
+ - Add a new base cop class `::RuboCop::Cop::RSpec::Base`. The old base class `::RuboCop::Cop::RSpec::Cop` is deprecated, and will be removed in the next major release. ([@bquorning])
421
+ - Add support for subject detection after includes and example groups in `RSpec/LeadingSubject`. ([@pirj])
422
+ - Ignore trailing punctuation in context description prefix. ([@elliterate])
423
+ - Relax `RSpec/VariableDefinition` cop so interpolated and multiline strings are accepted even when configured to enforce the `symbol` style. ([@bquorning])
424
+ - Fix `RSpec/EmptyExampleGroup` to flag example groups with examples in invalid scopes. ([@mlarraz])
425
+ - Fix `RSpec/EmptyExampleGroup` to ignore examples groups with examples defined inside iterators. ([@pirj])
426
+ - Improve `RSpec/NestedGroups`, `RSpec/FilePath`, `RSpec/DescribeMethod`, `RSpec/MultipleDescribes`, `RSpec/DescribeClass`'s top-level example group detection. ([@pirj])
427
+ - Add detection of `let!` with a block-pass or a string literal to `RSpec/LetSetup`. ([@pirj])
428
+ - Add `IgnoredPatterns` configuration option to `RSpec/VariableName`. ([@jtannas])
429
+ - Add `RSpec/MultipleMemoizedHelpers` cop. ([@mockdeep])
430
+
431
+ ## 1.42.0 (2020-07-09)
432
+
433
+ - Update RuboCop dependency to 0.87.0 because of changes to internal APIs. ([@bquorning], [@Darhazer])
434
+
435
+ ## 1.41.0 (2020-07-03)
436
+
437
+ - Extend the list of Rails spec types for `RSpec/DescribeClass`. ([@pirj])
438
+ - Fix `FactoryBot/AttributeDefinedStatically` to allow `#traits_for_enum` without a block. ([@harrylewis])
439
+ - Improve the performance of `FactoryBot/AttributeDefinedStatically`, `RSpec/InstanceVariable`, `RSpec/LetSetup`, `RSpec/NestedGroups` and `RSpec/ReturnFromStub`. ([@andrykonchin])
440
+
441
+ ## 1.40.0 (2020-06-11)
442
+
443
+ - Add new `RSpec/VariableName` cop. ([@tejasbubane])
444
+ - Add new `RSpec/VariableDefinition` cop. ([@tejasbubane])
445
+ - Expand `Capybara/VisibilityMatcher` to support more than just `have_selector`. ([@twalpole])
446
+ - Add new `SpecSuffixOnly` option to `RSpec/FilePath` cop. ([@zdennis])
447
+ - Allow `RSpec/RepeatedExampleGroupBody` to differ only by described_class. ([@robotdana])
448
+ - Fix `RSpec/FilePath` detection across sibling directories. ([@rolfschmidt])
449
+ - Improve the performance of `RSpec/SubjectStub` by an order of magnitude. ([@andrykonchin])
450
+
451
+ ## 1.39.0 (2020-05-01)
452
+
453
+ - Fix `RSpec/FilePath` detection when absolute path includes test subject. ([@eitoball])
454
+ - Add new `Capybara/VisibilityMatcher` cop. ([@aried3r])
455
+ - Ignore String constants by `RSpec/Describe`. ([@AlexWayfer])
456
+ - Drop support for ruby 2.3. ([@bquorning])
457
+ - Fix multiple cops to detect `let` with proc argument. ([@tejasbubane])
458
+ - Add autocorrect support for `RSpec/ScatteredLet`. ([@Darhazer])
459
+ - Add new `RSpec/EmptyHook` cop. ([@tejasbubane])
460
+
461
+ ## 1.38.1 (2020-02-15)
462
+
463
+ - Fix `RSpec/RepeatedDescription` to detect descriptions with interpolation and methods. ([@lazycoder9])
464
+
465
+ ## 1.38.0 (2020-02-11)
466
+
467
+ - Fix `RSpec/InstanceVariable` detection inside custom matchers. ([@pirj])
468
+ - Fix `RSpec/ScatteredSetup` to distinguish hooks with different metadata. ([@pirj])
469
+ - Add autocorrect support for `RSpec/ExpectActual` cop. ([@dduugg], [@pirj])
470
+ - Add `RSpec/RepeatedExampleGroupBody` cop. ([@lazycoder9])
471
+ - Add `RSpec/RepeatedExampleGroupDescription` cop. ([@lazycoder9])
472
+ - Add block name and other lines to `RSpec/ScatteredSetup` message. ([@elebow])
473
+ - Fix `RSpec/RepeatedDescription` to take into account example metadata. ([@lazycoder9])
474
+
475
+ ## 1.37.1 (2019-12-16)
476
+
477
+ - Improve message and description of `FactoryBot/FactoryClassName`. ([@ybiquitous])
478
+ - Fix `FactoryBot/FactoryClassName` to ignore `Hash` and `OpenStruct`. ([@jfragoulis])
479
+
480
+ ## 1.37.0 (2019-11-25)
481
+
482
+ - Implement `RSpec/DescribedClassModuleWrapping` to disallow RSpec statements within a module. ([@kellysutton])
483
+ - Fix documentation rake task to support RuboCop 0.75. ([@nickcampbell18])
484
+ - Fix `RSpec/SubjectStub` to detect implicit subjects stubbed. ([@QQism])
485
+ - Fix `RSpec/Pending` not flagging `skip` with string values. ([@pirj])
486
+ - Add `AllowedExplicitMatchers` config option for `RSpec/PredicateMatcher`. ([@mkrawc])
487
+ - Add `FactoryBot/FactoryClassName` cop. ([@jfragoulis])
488
+
489
+ ## 1.36.0 (2019-09-27)
490
+
491
+ - Fix `RSpec/DescribedClass`'s error when `described_class` is used as part of a constant. ([@pirj])
492
+ - Fix `RSpec/ExampleWording` autocorrect of multi-line docstrings. ([@pirj])
493
+ - Add `RSpec/ContextMethod` cop, to detect method names in `context`. ([@geniou])
494
+ - Update RuboCop dependency to 0.68.1 with support for children matching node pattern syntax. ([@pirj])
495
+ - Add `RSpec/EmptyLineAfterExample` cop to check that there is an empty line after example blocks. ([@pirj])
496
+ - Fix `Capybara/CurrentPathExpectation` auto-corrector, to include option `ignore_query: true`. ([@onumis])
497
+ - Fix `RSpec/Focus` detecting mixed array/hash metadata. ([@dgollahon])
498
+ - Fix `RSpec/Focus` to also detect `pending` examples. ([@dgollahon])
499
+
500
+ ## 1.35.0 (2019-08-02)
501
+
502
+ - Add `RSpec/ImplicitBlockExpectation` cop. ([@pirj])
503
+
504
+ ## 1.34.1 (2019-07-31)
505
+
506
+ - Fix `RSpec/DescribedClass`'s error when a local variable is part of the namespace. ([@pirj])
507
+
508
+ ## 1.34.0 (2019-07-23)
509
+
510
+ - Remove `AggregateFailuresByDefault` config option of `RSpec/MultipleExpectations`. ([@pirj])
511
+ - Add `RSpec/LeakyConstantDeclaration` cop. ([@jonatas], [@pirj])
512
+ - Improve `aggregate_failures` metadata detection of `RSpec/MultipleExpectations`. ([@pirj])
513
+ - Improve `RSpec/SubjectStub` detection and message. ([@pirj])
514
+ - Change message of `RSpec/LetSetup` cop to be more descriptive. ([@foton])
515
+ - Improve `RSpec/ExampleWording` to handle interpolated example messages. ([@nc-holodakg])
516
+ - Improve detection by allowing the use of `RSpec` as a top-level constant. ([@pirj])
517
+ - Fix `RSpec/DescribedClass`'s incorrect detection. ([@pirj])
518
+ - Improve `RSpec/DescribedClass`'s ability to detect inside modules and classes. ([@pirj])
519
+
520
+ ## 1.33.0 (2019-05-13)
521
+
522
+ - Let `RSpec/DescribedClass` pass `Struct` instantiation closures. ([@schmijos])
523
+ - Fixed `RSpec/ContextWording` missing `context`s with metadata. ([@pirj])
524
+ - Fix `FactoryBot/AttributeDefinedStatically` not working with an explicit receiver. ([@composerinteralia])
525
+ - Add `RSpec/Dialect` enforces custom RSpec dialects. ([@gsamokovarov])
526
+ - Fix redundant blank lines in `RSpec/MultipleSubjects`'s autocorrect. ([@pirj])
527
+ - Drop support for ruby `2.2`. ([@bquorning])
528
+
529
+ ## 1.32.0 (2019-01-27)
530
+
531
+ - Add `RSpec/Yield` cop, suggesting using the `and_yield` method when stubbing a method, accepting a block. ([@Darhazer])
532
+ - Fix `FactoryBot/CreateList` autocorrect crashing when the factory is called with a block=. ([@Darhazer])
533
+ - Fixed `RSpec/Focus` not flagging some cases of `RSpec.describe` with `focus: true`. ([@Darhazer])
534
+ - Fixed `RSpec/Pending` not flagging some cases of `RSpec.describe` with `:skip`. ([@Darhazer])
535
+ - Fix false positive in `RSpec/ReceiveCounts` when method name `exactly`, `at_least` or `at_most` is used along with `times`, without being an RSpec API. ([@Darhazer])
536
+
537
+ ## 1.31.0 (2019-01-02)
538
+
539
+ - Add `IgnoreSharedExamples` option for `RSpec/NamedSubject`. ([@RST-J])
540
+ - Add autocorrect support for `Capybara/CurrentPathExpectation` cop. ([@ypresto])
541
+ - Add support for built-in `exists` matcher for `RSpec/PredicateMatcher` cop. ([@mkenyon])
542
+ - `SingleArgumentMessageChain` no longer reports an array as it's only argument as an offense. ([@Darhazer])
543
+
544
+ ## 1.30.1 (2018-11-01)
545
+
546
+ - `FactoryBot/CreateList` now ignores `times` blocks with an argument. ([@Darhazer])
547
+
548
+ ## 1.30.0 (2018-10-08)
549
+
550
+ - Add config to `RSpec/VerifiedDoubles` to enforcement of verification on unnamed doubles. ([@BrentWheeldon])
551
+ - Fix `FactoryBot/AttributeDefinedStatically` not working when there is a non-symbol key. ([@vzvu3k6k])
552
+ - Fix false positive in `RSpec/ImplicitSubject` when `is_expected` is used inside `its()` block. ([@Darhazer])
553
+ - Add `single_statement_only` style to `RSpec/ImplicitSubject` as a more relaxed alternative to `single_line_only`. ([@Darhazer])
554
+ - Add `RSpec/UnspecifiedException` as a default cop to encourage more-specific `expect{}.to raise_error(ExceptionType)`, or `raise_exception` style handling of exceptions. ([@daveworth])
555
+
556
+ ## 1.29.1 (2018-09-01)
557
+
558
+ - Fix false negative in `FactoryBot/AttributeDefinedStatically` when attribute is defined on `self`. ([@Darhazer])
559
+ - `RSpec/FactoryBot` cops will now also inspect the `spec/factories.rb` path by default. ([@bquorning])
560
+
561
+ ## 1.29.0 (2018-08-25)
562
+
563
+ - `RSpec/InstanceVariable` - Recommend local variables in addition to `let`. ([@jaredbeck])
564
+ - Add `RSpec/ImplicitSubject` cop. ([@Darhazer])
565
+ - Add `RSpec/HooksBeforeExamples` cop. ([@Darhazer])
566
+
567
+ ## 1.28.0 (2018-08-14)
568
+
569
+ - Add `RSpec/ReceiveNever` cop enforcing usage of `not_to receive` instead of `never` matcher. ([@Darhazer])
570
+ - Fix false positive in `RSpec/EmptyLineAfterExampleGroup` cop when example is inside `if`. ([@Darhazer])
571
+ - Add `RSpec/MissingExampleGroupArgument` to enforce first argument for an example group. ([@geniou])
572
+ - Drop support for ruby `2.1`. ([@bquorning])
573
+ - Add `FactoryBot/AttributeDefinedStatically` cop to help FactoryBot users with the deprecation of static attributes. ([@composerinteralia], [@seanpdoyle])
574
+ - Remove `FactoryBot/DynamicAttributeDefinedStatically` and `FactoryBot/StaticAttributeDefinedDynamically` cops. ([@composerinteralia])
575
+
576
+ ## 1.27.0 (2018-06-14)
577
+
578
+ - `RSpec/LeadingSubject` now enforces subject to be before any examples, hooks or let declarations. ([@Darhazer])
579
+ - Fix `RSpec/NotToNot` to highlight only the selector (`not_to` or `to_not`), so it works also on `expect { ... }` blocks. ([@bquorning])
580
+ - Add `RSpec/EmptyLineAfterHook` cop. ([@bquorning])
581
+ - Add `RSpec/EmptyLineAfterExampleGroup` cop to check that there is an empty line after example group blocks. ([@bquorning])
582
+ - Fix `RSpec/DescribeClass` crashing on `RSpec.describe` without arguments. ([@Darhazer])
583
+ - Bump RuboCop requirement to v0.56.0. ([@bquorning])
584
+ - Fix `RSpec/OverwritingSetup` crashing if a variable is used as an argument for `let`. ([@Darhazer])
585
+
586
+ ## 1.26.0 (2018-06-06)
587
+
588
+ - Fix false positive in `RSpec/EmptyExampleGroup` cop when methods named like a RSpec method are used. ([@Darhazer])
589
+ - Fix `Capybara/FeatureMethods` not working when there is require before the spec. ([@Darhazer])
590
+ - Fix `RSpec/EmptyLineAfterFinalLet`: allow a comment to be placed after latest let, requiring empty line after the comment. ([@Darhazer])
591
+ - Add `RSpec/ReceiveCounts` cop to enforce usage of :once and :twice matchers. ([@Darhazer])
592
+
593
+ ## 1.25.1 (2018-04-10)
594
+
595
+ - Fix false positive in `RSpec/Pending` cop when pending is used as a method name. ([@Darhazer])
596
+ - Fix `FactoryBot/DynamicAttributeDefinedStatically` false positive when using symbol proc argument for a sequence. ([@tdeo])
597
+
598
+ ## 1.25.0 (2018-04-07)
599
+
600
+ - Add `RSpec/SharedExamples` cop to enforce consistent usage of string to titleize shared examples. ([@anthony-robin])
601
+ - Add `RSpec/Be` cop to enforce passing argument to the generic `be` matcher. ([@Darhazer])
602
+ - Fix false positives in `StaticAttributeDefinedDynamically` and `ReturnFromStub` when a const is used in an array or hash. ([@Darhazer])
603
+ - Add `RSpec/Pending` cop to enforce no existing pending or skipped examples. This is disabled by default. ([@patrickomatic])
604
+ - Fix `RSpec/NestedGroups` cop support --auto-gen-config. ([@walf443])
605
+ - Fix false positives in `Capybara/FeatureMethods` when feature methods are used as property names in a factory. ([@Darhazer])
606
+ - Allow configuring enabled methods in `Capybara/FeatureMethods`. ([@Darhazer])
607
+ - Add `FactoryBot/CreateList` cop. ([@Darhazer])
608
+
609
+ ## 1.24.0 (2018-03-06)
610
+
611
+ - Compatibility with RuboCop v0.53.0. ([@bquorning])
612
+ - The `Rails/HttpStatus` cop is unavailable if the `rack` gem cannot be loaded. ([@bquorning])
613
+ - Fix `Rails/HttpStatus` not working with custom HTTP status codes. ([@bquorning])
614
+ - Fix `FactoryBot/StaticAttributeDefinedDynamically` to handle empty block. ([@abrom])
615
+ - Fix false positive in `FactoryBot/DynamicAttributeDefinedStatically` when a before/after callback has a symbol proc argument. ([@abrom])
616
+
617
+ ## 1.23.0 (2018-02-23)
618
+
619
+ - Add `RSpec/Rails/HttpStatus` cop to enforce consistent usage of the status format (numeric or symbolic). ([@anthony-robin], [@jojos003])
620
+ - Fix false negative in `RSpec/ReturnFromStub` when a constant is being returned by the stub. ([@Darhazer])
621
+ - Fix `FactoryBot/DynamicAttributeDefinedStatically` to handle dynamic attributes inside arrays/hashes. ([@abrom])
622
+ - Add `FactoryBot/StaticAttributeDefinedDynamically` (based on dynamic attribute cop). ([@abrom])
623
+
624
+ ## 1.22.2 (2018-02-01)
625
+
626
+ - Fix error in `RSpec/DescribedClass` when working on an empty `describe` block. ([@bquorning])
627
+
628
+ ## 1.22.1 (2018-01-17)
629
+
630
+ - Fix false positives in `RSpec/ReturnFromStub`. ([@Darhazer])
631
+
632
+ ## 1.22.0 (2018-01-10)
633
+
634
+ - Updates `describe_class` to account for RSpecs `:system` wrapper of rails system tests. ([@EliseFitz15])
635
+ - Add `RSpec/ExpectChange` cop to enforce consistent usage of the change matcher. ([@Darhazer])
636
+ - Add autocorrect support to `RSpec/LetBeforeExamples`. ([@Darhazer])
637
+ - Fix `RSpec/InstanceVariable` flagging instance variables inside dynamically defined class. ([@Darhazer])
638
+ - Add autocorrect support for `RSpec/ReturnFromStub` cop. ([@bquorning])
639
+ - Add `RSpec/ExampleWithoutDescription` cop. ([@Darhazer])
640
+
641
+ ## 1.21.0 (2017-12-13)
642
+
643
+ - Compatibility with RuboCop v0.52.0. ([@bquorning])
644
+ - Improve performance when user does not override default RSpec Pattern config. ([@walf443])
645
+ - Add `AggregateFailuresByDefault` configuration for `RSpec/MultipleExpectations` cop. ([@onk])
646
+
647
+ ## 1.20.1 (2017-11-15)
648
+
649
+ - Add "without" to list of default allowed prefixes for `RSpec/ContextWording`. ([@bquorning])
650
+
651
+ ## 1.20.0 (2017-11-09)
652
+
653
+ - Rename namespace `FactoryGirl` to `FactoryBot` following original library update. ([@walf443])
654
+ - Fix exception in `RSpec/ReturnFromStub` on empty block. ([@yevhene])
655
+ - Add `RSpec/ContextWording` cop. ([@pirj], [@telmofcosta])
656
+ - Fix `RSpec/SubjectStub` cop matches receive message inside all matcher. ([@walf443])
657
+
658
+ ## 1.19.0 (2017-10-18)
659
+
660
+ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
661
+
662
+ ## 1.18.0 (2017-09-29)
663
+
664
+ - Fix false positive in `Capybara/FeatureMethods`. ([@Darhazer])
665
+ - Add `RSpec/Capybara/CurrentPathExpectation` cop for feature specs, disallowing setting expectations on `current_path`. ([@timrogers])
666
+ - Fix false positive in `RSpec/LetBeforeExamples` cop when example group contains single let. ([@Darhazer])
667
+
668
+ ## 1.17.1 (2017-09-20)
669
+
670
+ - Improved `RSpec/ReturnFromStub` to handle string interpolation, hashes and do..end blocks. ([@Darhazer])
671
+ - Fixed compatibility with JRuby. ([@zverok])
672
+
673
+ ## 1.17.0 (2017-09-14)
674
+
675
+ - Add `RSpec/Capybara` namespace including the first cop for feature specs: `Capybara/FeatureMethods`. ([@rspeicher])
676
+ - Update to RuboCop 0.50.0. ([@bquorning])
677
+
678
+ ## 1.16.0 (2017-09-06)
679
+
680
+ - Add `RSpec/FactoryGirl` namespace including the first cop for factories: `FactoryGirl/DynamicAttributeDefinedStatically`. ([@jonatas])
681
+ - Add disabled by default `RSpec/AlignLeftLetBrace`. ([@backus])
682
+ - Add disabled by default `RSpec/AlignRightLetBrace`. ([@backus])
683
+ - Add `RSpec/LetBeforeExamples` cop. ([@Darhazer])
684
+ - Add `RSpec/MultipleSubjects` cop. ([@backus])
685
+ - Add `RSpec/ReturnFromStub` cop. ([@Darhazer])
686
+ - Add `RSpec/VoidExpect` cop. ([@pocke])
687
+ - Add `RSpec/InvalidPredicateMatcher` cop. ([@pocke])
688
+ - Change HookArgument cop to detect when hook has a receiver. ([@pocke])
689
+ - Add `RSpec/PredicateMatcher` cop. ([@pocke])
690
+ - Add `RSpec/ExpectInHook` cop. ([@pocke])
691
+ - `RSpec/MultipleExpectations` now detects usage of expect_any_instance_of. ([@Darhazer])
692
+ - `RSpec/MultipleExpectations` now detects usage of is_expected. ([@bmorrall])
693
+
694
+ ## 1.15.1 (2017-04-30)
695
+
696
+ - Fix the handling of various edge cases in the `RSpec/ExampleWording` cop, including one that would cause autocorrect to crash. ([@dgollahon])
697
+ - Fix `RSpec/IteratedExpectation` crashing when there is an assignment in the iteration. ([@Darhazer])
698
+ - Fix false positive in `RSpec/SingleArgumentMessageChain` cop when the single argument is a hash. ([@Darhazer])
699
+
700
+ ## 1.15.0 (2017-03-24)
701
+
702
+ - Add `RSpec/DescribeSymbol` cop. ([@rspeicher])
703
+ - Fix error when `RSpec/OverwritingSetup` and `RSpec/ScatteredLet` analyzed empty example groups. ([@backus])
704
+
705
+ ## 1.14.0 (2017-03-24)
706
+
707
+ - Add `RSpec/OverwritingSetup` cop. ([@Darhazer])
708
+ - Add autocorrect support for `RSpec/LeadingSubject` cop. ([@Darhazer])
709
+ - Add `RSpec/ScatteredLet` cop. ([@Darhazer])
710
+ - Add `RSpec/IteratedExpectation` cop. ([@Darhazer])
711
+ - Add `RSpec/EmptyLineAfterSubject` cop. ([@Darhazer])
712
+ - Add `RSpec/EmptyLineAfterFinalLet` cop. ([@Darhazer])
713
+
714
+ ## 1.13.0 (2017-03-07)
715
+
716
+ - Add repeated 'it' detection to `RSpec/ExampleWording` cop. ([@dgollahon])
717
+ - Add \[observed_nesting/max_nesting\] info to `RSpec/NestedGroups` messages. ([@dgollahon])
718
+ - Add `RSpec/ItBehavesLike` cop. ([@dgollahon])
719
+ - Add `RSpec/SharedContext` cop. ([@Darhazer])
720
+ - `RSpec/MultipleExpectations`: Count aggregate_failures block as single expectation. ([@Darhazer])
721
+ - Fix `ExpectActual` cop flagging `rspec-rails` routing specs. ([@backus])
722
+ - Fix `FilePath` cop not registering offenses for files like `spec/blog/user.rb` when it should be `spec/blog/user_spec.rb`. ([@backus])
723
+
724
+ ## 1.12.0 (2017-02-21)
725
+
726
+ - Add `RSpec/InstanceSpy` cop. ([@Darhazer])
727
+ - Add `RSpec/BeforeAfterAll` for avoiding leaky global test setup. ([@cfabianski])
728
+
729
+ ## 1.11.0 (2017-02-16)
730
+
731
+ - Add `AroundBlock` cop. ([@Darhazer])
732
+ - Add `EnforcedStyle` configuration for `RSpec/DescribedClass` cop. ([@Darhazer])
733
+ - Fix false positive for `RSpec/RepeatedExample` cop. ([@redross])
734
+
735
+ ## 1.10.0 (2017-01-15)
736
+
737
+ - Fix false negative for `RSpec/MessageSpies` cop. ([@onk])
738
+ - Fix internal dependencies on RuboCop to be compatible with 0.47 release. ([@backus])
739
+ - Add autocorrect support for `SingleArgumentMessageChain` cop. ([@bquorning])
740
+ - Rename `NestedGroups`' configuration key from `MaxNesting` to `Max` in order to be consistent with other cop configuration. ([@backus])
741
+ - Add `RepeatedExample` cop for detecting repeated examples within example groups. ([@backus])
742
+ - Add `ScatteredSetup` cop for enforcing that only one `before`, `around`, and `after` hook are used per example group scope. ([@backus])
743
+ - Add `ExpectOutput` cop for recommending `expect { ... }.to output(...).to_stdout`. ([@backus])
744
+
745
+ ## 1.9.1 (2017-01-02)
746
+
747
+ - Fix unintentional regression change in `NestedGroups` reported in #270. ([@backus])
748
+ - Change `MaxNesting` for `NestedGroups` from 2 to 3. ([@backus])
749
+
750
+ ## 1.9.0 (2016-12-29)
751
+
752
+ - Add `MessageSpies` cop for enforcing consistent style of either `expect(...).to have_received` or `expect(...).to receive`, intended as a replacement for the `MessageExpectation` cop. ([@bquorning])
753
+ - Fix `DescribeClass` to not flag `describe` at the top of a block of shared examples. ([@clupprich])
754
+ - Add `SingleArgumentMessageChain` cop for recommending use of `receive` instead of `receive_message_chain` where possible. ([@bquorning])
755
+ - Add `RepeatedDescription` cop for detecting repeated example descriptions within example groups. ([@backus])
756
+
757
+ ## 1.8.0 (2016-10-27)
758
+
759
+ - Optionally ignore method names in the `describe` argument when running the `FilePath` cop. ([@bquorning])
760
+ - Fix regression in how `FilePath` converts alphanumeric class names into paths. ([@bquorning])
761
+ - Add `ImplicitExpect` cop for enforcing `should` vs. `is_expected.to`. ([@backus])
762
+ - Disable `MessageExpectation` cop in the default configuration. ([@bquorning])
4
763
 
5
764
  ## 1.7.0 (2016-08-24)
6
765
 
7
- * Add support for checking all example groups with `ExampleLength`. ([@backus][])
8
- * Add support for checking shared example groups for `DescribedClass`. ([@backus][])
9
- * Add support for checking `its` from [rspec-its](https://github.com/rspec/rspec-its). ([@backus][])
10
- * Add `EmptyExampleGroup` cop for detecting `describe`s and `context`s without any tests inside. ([@backus][])
11
- * Add `CustomIncludeMethods` configuration option for `EmptyExampleGroup`. ([@backus][])
12
- * Add `NestedGroups` cop for detecting excessive example group nesting. ([@backus][])
13
- * Add `MaxNesting` configuration option for `NestedGroups` cop. ([@backus][])
14
- * Add `ExpectActual` cop for detecting literal values within `expect(...)`. ([@backus][])
15
- * Add `MultipleExpectations` cop for detecting multiple `expect(...)` calls within one example. ([@backus][])
16
- * Add `Max` configuration option for `MultipleExpectations`. ([@backus][])
17
- * Add `SubjectStub` cop for testing stubbed test subjects. ([@backus][])
18
- * Add `LetSetup` cop for detecting cases where `let!` is used for test setup. ([@backus][])
19
- * Change all cops to only inspect files with names following rspec convention (`*/spec/*` and/or `_spec.rb`). ([@backus][])
20
- * Add `AllCops/RSpec` configuration option for specifying custom spec file patterns. ([@backus][])
21
- * Add `AssignmentOnly` configuration option for `RSpec/InstanceVariable` cop. ([@backus][])
22
- * Add `BeEql` cop which looks for expectations that can use `be(...)` instead of `eql(...)`. ([@backus][])
23
- * Add autocorrect support for `BeEql` cop. ([@backus][])
24
- * Add `MessageExpectation` cop for enforcing consistent style of either `expect(...).to receive` or `allow(...).to receive`. ([@backus][])
25
- * Add `MessageChain` cop. ([@bquorning][])
766
+ - Add support for checking all example groups with `ExampleLength`. ([@backus])
767
+ - Add support for checking shared example groups for `DescribedClass`. ([@backus])
768
+ - Add support for checking `its` from [rspec-its](https://github.com/rspec/rspec-its). ([@backus])
769
+ - Add `EmptyExampleGroup` cop for detecting `describe`s and `context`s without any tests inside. ([@backus])
770
+ - Add `CustomIncludeMethods` configuration option for `EmptyExampleGroup`. ([@backus])
771
+ - Add `NestedGroups` cop for detecting excessive example group nesting. ([@backus])
772
+ - Add `MaxNesting` configuration option for `NestedGroups` cop. ([@backus])
773
+ - Add `ExpectActual` cop for detecting literal values within `expect(...)`. ([@backus])
774
+ - Add `MultipleExpectations` cop for detecting multiple `expect(...)` calls within one example. ([@backus])
775
+ - Add `Max` configuration option for `MultipleExpectations`. ([@backus])
776
+ - Add `SubjectStub` cop for testing stubbed test subjects. ([@backus])
777
+ - Add `LetSetup` cop for detecting cases where `let!` is used for test setup. ([@backus])
778
+ - Change all cops to only inspect files with names following rspec convention (`*/spec/*` and/or `_spec.rb`). ([@backus])
779
+ - Add `AllCops/RSpec` configuration option for specifying custom spec file patterns. ([@backus])
780
+ - Add `AssignmentOnly` configuration option for `RSpec/InstanceVariable` cop. ([@backus])
781
+ - Add `BeEql` cop which looks for expectations that can use `be(...)` instead of `eql(...)`. ([@backus])
782
+ - Add autocorrect support for `BeEql` cop. ([@backus])
783
+ - Add `MessageExpectation` cop for enforcing consistent style of either `expect(...).to receive` or `allow(...).to receive`. ([@backus])
784
+ - Add `MessageChain` cop. ([@bquorning])
26
785
 
27
786
  ## 1.6.0 (2016-08-03)
28
787
 
29
- * Add `SkipBlocks` option for `DescribedClass` cop. ([@backus][])
788
+ - Add `SkipBlocks` option for `DescribedClass` cop. ([@backus])
30
789
 
31
790
  ## 1.5.3 (2016-08-02)
32
791
 
33
- * Add `RSpec/NamedSubject` cop. ([@backus][])
792
+ - Add `RSpec/NamedSubject` cop. ([@backus])
34
793
 
35
794
  ## 1.5.2 (2016-08-01)
36
795
 
37
- * Drop support for ruby `2.0.0` and `2.1.0`. ([@backus][])
38
- * Internal refactorings and improved test coverage. ([@backus][])
796
+ - Drop support for ruby `2.0.0` and `2.1.0`. ([@backus])
797
+ - Internal refactorings and improved test coverage. ([@backus])
39
798
 
40
799
  ## 1.5.1 (2016-07-20)
41
800
 
42
- * Fix `unrecognized parameter RSpec/VerifiedDoubles:IgnoreSymbolicNames` warning. ([@jeffreyc][])
43
- * Update to rubocop 0.41.2. ([@backus][])
801
+ - Fix `unrecognized parameter RSpec/VerifiedDoubles:IgnoreSymbolicNames` warning. ([@jeffreyc])
802
+ - Update to rubocop 0.41.2. ([@backus])
44
803
 
45
804
  ## 1.5.0 (2016-05-17)
46
805
 
47
- * Expand `VerifiedDoubles` cop to check for `spy` as well as `double`. ([@andyw8][])
48
- * Enable `VerifiedDoubles` cop by default. ([@andyw8][])
49
- * Add `IgnoreSymbolicNames` option for `VerifiedDoubles` cop. ([@andyw8][])
50
- * Add `RSpec::ExampleLength` cop. ([@andyw8][])
51
- * Handle alphanumeric class names in `FilePath` cop. ([@andyw8][])
52
- * Skip `DescribeClass` cop for view specs. ([@andyw8][])
53
- * Skip `FilePath` cop for Rails routing specs. ([@andyw8][])
54
- * Add cop to check for focused specs. ([@renanborgescampos][], [@jaredmoody][])
55
- * Clean-up `RSpec::NotToNot` to use same configuration semantics as other Rubocop cops, add autocorrect support for `RSpec::NotToNot`. ([@baberthal][])
56
- * Update to rubocop 0.40.0. ([@nijikon][])
806
+ - Expand `VerifiedDoubles` cop to check for `spy` as well as `double`. ([@andyw8])
807
+ - Enable `VerifiedDoubles` cop by default. ([@andyw8])
808
+ - Add `IgnoreSymbolicNames` option for `VerifiedDoubles` cop. ([@andyw8])
809
+ - Add `RSpec::ExampleLength` cop. ([@andyw8])
810
+ - Handle alphanumeric class names in `FilePath` cop. ([@andyw8])
811
+ - Skip `DescribeClass` cop for view specs. ([@andyw8])
812
+ - Skip `FilePath` cop for Rails routing specs. ([@andyw8])
813
+ - Add cop to check for focused specs. ([@renanborgescampos], [@jaredmoody])
814
+ - Clean-up `RSpec::NotToNot` to use same configuration semantics as other RuboCop cops, add autocorrect support for `RSpec::NotToNot`. ([@baberthal])
815
+ - Update to rubocop 0.40.0. ([@nijikon])
57
816
 
58
817
  ## 1.4.1 (2016-04-03)
59
818
 
60
- * Ignore routing specs for DescribeClass cop. ([@nijikon][])
61
- * Move rubocop dependency to runtime. ([@nijikon][])
62
- * Update to rubocop 0.39.0. ([@nijikon][])
819
+ - Ignore routing specs for DescribeClass cop. ([@nijikon])
820
+ - Move rubocop dependency to runtime. ([@nijikon])
821
+ - Update to rubocop 0.39.0. ([@nijikon])
63
822
 
64
823
  ## 1.4.0 (2016-02-15)
65
824
 
66
- * Update to rubocop 0.37.2. ([@nijikon][])
67
- * Update ruby versions we test against. ([@nijikon][])
68
- * Add `RSpec::NotToNot` cop. ([@miguelfteixeira][])
69
- * Add `Rspec/AnyInstance` cop. ([@mlarraz][])
825
+ - Update to rubocop 0.37.2. ([@nijikon])
826
+ - Update ruby versions we test against. ([@nijikon])
827
+ - Add `RSpec::NotToNot` cop. ([@miguelfteixeira])
828
+ - Add `RSpec/AnyInstance` cop. ([@mlarraz])
70
829
 
71
830
  ## 1.3.1
72
831
 
73
- * Fix auto correction issue - syntax had changed in RuboCop v0.31. ([@bquorning][])
74
- * Add RuboCop clone to vendor folder - see #39 for details. ([@bquorning][])
832
+ - Fix auto correction issue - syntax had changed in RuboCop v0.31. ([@bquorning])
833
+ - Add RuboCop clone to vendor folder - see #39 for details. ([@bquorning])
75
834
 
76
835
  ## 1.3.0
77
836
 
78
- * Ignore non string arguments for FilePathCop - thanks to @deivid-rodriguez. ([@geniou][])
79
- * Skip DescribeMethod cop for tagged specs. ([@deivid-rodriguez][])
80
- * Skip DescribeClass cop for feature/request specs. ([@deivid-rodriguez][])
837
+ - Ignore non string arguments for FilePathCop - thanks to @deivid-rodriguez. ([@geniou])
838
+ - Skip DescribeMethod cop for tagged specs. ([@deivid-rodriguez])
839
+ - Skip DescribeClass cop for feature/request specs. ([@deivid-rodriguez])
81
840
 
82
841
  ## 1.2.2
83
842
 
84
- * Make `RSpec::ExampleWording` case insensitive. ([@geniou][])
843
+ - Make `RSpec::ExampleWording` case insensitive. ([@geniou])
85
844
 
86
845
  ## 1.2.1
87
846
 
88
- * Add `RSpec::VerifiedDoubles` cop. ([@andyw8][])
847
+ - Add `RSpec::VerifiedDoubles` cop. ([@andyw8])
89
848
 
90
849
  ## 1.2.0
91
850
 
92
- * Drop support of ruby `1.9.2`. ([@geniou][])
93
- * Update to RuboCop `~> 0.24`. ([@geniou][])
94
- * Add `autocorrect` to `RSpec::ExampleWording`. This experimental - use with care and check the changes. ([@geniou][])
95
- * Fix config loader debug output. ([@geniou][])
96
- * Rename `FileName` cop to `FilePath` as a workaround - see [#19](https://github.com/nevir/rubocop-rspec/issues/19). ([@geniou][])
851
+ - Drop support of ruby `1.9.2`. ([@geniou])
852
+ - Update to RuboCop `~> 0.24`. ([@geniou])
853
+ - Add `autocorrect` to `RSpec::ExampleWording`. This experimental - use with care and check the changes. ([@geniou])
854
+ - Fix config loader debug output. ([@geniou])
855
+ - Rename `FileName` cop to `FilePath` as a workaround - see [#19](https://github.com/nevir/rubocop-rspec/issues/19). ([@geniou])
97
856
 
98
857
  ## 1.1.0
99
858
 
100
- * Add `autocorrect` to `RSpec::DescribedClass` cop. ([@geniou][])
859
+ - Add `autocorrect` to `RSpec::DescribedClass` cop. ([@geniou])
101
860
 
102
861
  ## 1.0.1
103
862
 
104
- * Add `config` folder to gemspec. ([@pstengel][])
863
+ - Add `config` folder to gemspec. ([@pstengel])
105
864
 
106
865
  ## 1.0.rc3
107
866
 
108
- * Update to RuboCop `>= 0.23`. ([@geniou][])
109
- * Add configuration option for `CustomTransformation` to `FileName` cop. ([@geniou][])
867
+ - Update to RuboCop `>= 0.23`. ([@geniou])
868
+ - Add configuration option for `CustomTransformation` to `FileName` cop. ([@geniou])
110
869
 
111
870
  ## 1.0.rc2
112
871
 
113
- * Gem is no longer 20MB (sorry!). ([@nevir][])
114
- * `RspecFileName` cop allows for method specs to organized into directories by class and type. ([@nevir][])
872
+ - Gem is no longer 20MB (sorry!). ([@nevir])
873
+ - `RspecFileName` cop allows for method specs to organized into directories by class and type. ([@nevir])
115
874
 
116
875
  ## 1.0.rc1
117
876
 
118
- * Update code to work with rubocop `>= 0.19`. ([@geniou][])
119
- * Split `UnitSpecNaming` cop into `RSpecDescribeClass`, `RSpecDescribeMethod` and `RSpecFileName` and enabled them all by default. ([@geniou][])
120
- * Add `RSpecExampleWording` cop to prevent to use of should at the beginning of the spec description. ([@geniou][])
121
- * Fix `RSpecFileName` cop for non-class specs. ([@geniou][])
122
- * Adapt `RSpecFileName` cop to commen naming convention and skip spec with multiple top level describes. ([@geniou][])
123
- * Add `RSpecMultipleDescribes` cop to check for multiple top level describes. ([@geniou][])
124
- * Add `RSpecDescribedClass` to promote the use of `described_class`. ([@geniou][])
125
- * Add `RSpecInstanceVariable` cop to check for the usage of instance variables. ([@geniou][])
126
-
127
- <!-- Contributors -->
128
-
877
+ - Update code to work with rubocop `>= 0.19`. ([@geniou])
878
+ - Split `UnitSpecNaming` cop into `RSpecDescribeClass`, `RSpecDescribeMethod` and `RSpecFileName` and enabled them all by default. ([@geniou])
879
+ - Add `RSpecExampleWording` cop to prevent to use of should at the beginning of the spec description. ([@geniou])
880
+ - Fix `RSpecFileName` cop for non-class specs. ([@geniou])
881
+ - Adapt `RSpecFileName` cop to common naming convention and skip spec with multiple top level describes. ([@geniou])
882
+ - Add `RSpecMultipleDescribes` cop to check for multiple top level describes. ([@geniou])
883
+ - Add `RSpecDescribedClass` to promote the use of `described_class`. ([@geniou])
884
+ - Add `RSpecInstanceVariable` cop to check for the usage of instance variables. ([@geniou])
885
+
886
+ <!-- Contributors (alphabetically) -->
887
+
888
+ [@abrom]: https://github.com/abrom
889
+ [@ahukkanen]: https://github.com/ahukkanen
890
+ [@akiomik]: https://github.com/akiomik
891
+ [@akrox58]: https://github.com/akrox58
892
+ [@alexwayfer]: https://github.com/AlexWayfer
893
+ [@andrykonchin]: https://github.com/andrykonchin
129
894
  [@andyw8]: https://github.com/andyw8
895
+ [@anthony-robin]: https://github.com/anthony-robin
896
+ [@aried3r]: https://github.com/aried3r
897
+ [@baberthal]: https://github.com/baberthal
130
898
  [@backus]: https://github.com/backus
899
+ [@bcgraham]: https://github.com/bcgraham
900
+ [@biinari]: https://github.com/biinari
901
+ [@bmorrall]: https://github.com/bmorrall
131
902
  [@bquorning]: https://github.com/bquorning
903
+ [@brentwheeldon]: https://github.com/BrentWheeldon
904
+ [@brianhawley]: https://github.com/BrianHawley
905
+ [@cfabianski]: https://github.com/cfabianski
906
+ [@clupprich]: https://github.com/clupprich
907
+ [@composerinteralia]: https://github.com/composerinteralia
908
+ [@corydiamand]: https://github.com/corydiamand
909
+ [@darhazer]: https://github.com/Darhazer
910
+ [@daveworth]: https://github.com/daveworth
911
+ [@dduugg]: https://github.com/dduugg
132
912
  [@deivid-rodriguez]: https://github.com/deivid-rodriguez
913
+ [@dgollahon]: https://github.com/dgollahon
914
+ [@dmitrytsepelev]: https://github.com/dmitrytsepelev
915
+ [@drcapulet]: https://github.com/drcapulet
916
+ [@drowze]: https://github.com/Drowze
917
+ [@dswij]: https://github.com/dswij
918
+ [@dvandersluis]: https://github.com/dvandersluis
919
+ [@earlopain]: https://github.com/earlopain
920
+ [@edgibbs]: https://github.com/edgibbs
921
+ [@eikes]: https://github.com/eikes
922
+ [@eitoball]: https://github.com/eitoball
923
+ [@elebow]: https://github.com/elebow
924
+ [@elisefitz15]: https://github.com/EliseFitz15
925
+ [@elliterate]: https://github.com/elliterate
926
+ [@faucct]: https://github.com/faucct
927
+ [@foton]: https://github.com/foton
928
+ [@francois-ferrandis]: https://github.com/francois-ferrandis
929
+ [@franzliedke]: https://github.com/franzliedke
930
+ [@g-rath]: https://github.com/G-Rath
133
931
  [@geniou]: https://github.com/geniou
134
- [@jawshooah]: https://github.com/jawshooah
932
+ [@gsamokovarov]: https://github.com/gsamokovarov
933
+ [@harry-graham]: https://github.com/harry-graham
934
+ [@harrylewis]: https://github.com/harrylewis
935
+ [@hasghari]: https://github.com/hasghari
936
+ [@hosamaly]: https://github.com/hosamaly
937
+ [@ignaciovillaverde]: https://github.com/ignaciovillaverde
938
+ [@jaredbeck]: https://github.com/jaredbeck
939
+ [@jaredmoody]: https://github.com/jaredmoody
940
+ [@jdufresne]: https://github.com/jdufresne
941
+ [@jeffreyc]: https://github.com/jeffreyc
942
+ [@jeppester]: https://github.com/jeppester
943
+ [@jessieay]: https://github.com/jessieay
944
+ [@jfragoulis]: https://github.com/jfragoulis
945
+ [@johnny-miyake]: https://github.com/johnny-miyake
946
+ [@jojos003]: https://github.com/jojos003
947
+ [@jonatas]: https://github.com/jonatas
948
+ [@jtannas]: https://github.com/jtannas
949
+ [@k-s-a]: https://github.com/K-S-A
950
+ [@kellysutton]: https://github.com/kellysutton
951
+ [@koic]: https://github.com/koic
952
+ [@krororo]: https://github.com/krororo
953
+ [@kuahyeow]: https://github.com/kuahyeow
954
+ [@lazycoder9]: https://github.com/lazycoder9
955
+ [@leoarnold]: https://github.com/leoarnold
956
+ [@liberatys]: https://github.com/Liberatys
957
+ [@lokhi]: https://github.com/lokhi
958
+ [@luke-hill]: https://github.com/luke-hill
959
+ [@m-yamashita01]: https://github.com/M-Yamashita01
960
+ [@marocchino]: https://github.com/marocchino
961
+ [@miguelfteixeira]: https://github.com/miguelfteixeira
962
+ [@mkenyon]: https://github.com/mkenyon
963
+ [@mkrawc]: https://github.com/mkrawc
964
+ [@mlarraz]: https://github.com/mlarraz
965
+ [@mockdeep]: https://github.com/mockdeep
966
+ [@mothonmars]: https://github.com/MothOnMars
967
+ [@mvz]: https://github.com/mvz
968
+ [@naveg]: https://github.com/naveg
969
+ [@nc-holodakg]: https://github.com/nc-holodakg
135
970
  [@nevir]: https://github.com/nevir
971
+ [@ngouy]: https://github.com/ngouy
972
+ [@nickcampbell18]: https://github.com/nickcampbell18
136
973
  [@nijikon]: https://github.com/nijikon
974
+ [@onk]: https://github.com/onk
975
+ [@onumis]: https://github.com/onumis
976
+ [@oshiro3]: https://github.com/oshiro3
977
+ [@patrickomatic]: https://github.com/patrickomatic
978
+ [@paydaylight]: https://github.com/paydaylight
979
+ [@philcoggins]: https://github.com/PhilCoggins
980
+ [@pirj]: https://github.com/pirj
981
+ [@pocke]: https://github.com/pocke
137
982
  [@pstengel]: https://github.com/pstengel
138
- [@miguelfteixeira]: https://github.com/miguelfteixeira
139
- [@mlarraz]: https://github.com/mlarraz
983
+ [@qqism]: https://github.com/QQism
984
+ [@r7kamura]: https://github.com/r7kamura
985
+ [@rafix02]: https://github.com/Rafix02
986
+ [@redross]: https://github.com/redross
140
987
  [@renanborgescampos]: https://github.com/renanborgescampos
141
- [@jaredmoody]: https://github.com/jaredmoody
142
- [@baberthal]: https://github.com/baberthal
143
- [@jeffreyc]: https://github.com/jeffreyc
988
+ [@robinaugh]: https://github.com/robinaugh
989
+ [@robotdana]: https://github.com/robotdana
990
+ [@rolfschmidt]: https://github.com/rolfschmidt
991
+ [@rrosenblum]: https://github.com/rrosenblum
992
+ [@rspeicher]: https://github.com/rspeicher
993
+ [@rst-j]: https://github.com/RST-J
994
+ [@samrjenkins]: https://github.com/samrjenkins
995
+ [@schmijos]: https://github.com/schmijos
996
+ [@seanpdoyle]: https://github.com/seanpdoyle
997
+ [@sl4vr]: https://github.com/sl4vr
998
+ [@smcgivern]: https://github.com/smcgivern
999
+ [@splattael]: https://github.com/splattael
1000
+ [@stephannv]: https://github.com/stephannv
1001
+ [@swelther]: https://github.com/swelther
1002
+ [@t3h2mas]: https://github.com/t3h2mas
1003
+ [@tdeo]: https://github.com/tdeo
1004
+ [@tejasbubane]: https://github.com/tejasbubane
1005
+ [@telmofcosta]: https://github.com/telmofcosta
1006
+ [@tietew]: https://github.com/Tietew
1007
+ [@timrogers]: https://github.com/timrogers
1008
+ [@tmaier]: https://github.com/tmaier
1009
+ [@topalovic]: https://github.com/topalovic
1010
+ [@twalpole]: https://github.com/twalpole
1011
+ [@vzvu3k6k]: https://github.com/vzvu3k6k
1012
+ [@walf443]: https://github.com/walf443
1013
+ [@yasu551]: https://github.com/yasu551
1014
+ [@ybiquitous]: https://github.com/ybiquitous
1015
+ [@ydah]: https://github.com/ydah
1016
+ [@yevhene]: https://github.com/yevhene
1017
+ [@ypresto]: https://github.com/ypresto
1018
+ [@zdennis]: https://github.com/zdennis
1019
+ [@zverok]: https://github.com/zverok