rubocop-rspec 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +405 -379
- data/CODE_OF_CONDUCT.md +4 -4
- data/MIT-LICENSE.md +1 -2
- data/config/default.yml +65 -4
- data/lib/rubocop/cop/rspec/capybara/negation_matcher.rb +106 -0
- data/lib/rubocop/cop/rspec/capybara/specific_actions.rb +85 -0
- data/lib/rubocop/cop/rspec/capybara/specific_finders.rb +9 -2
- data/lib/rubocop/cop/rspec/capybara/specific_matcher.rb +5 -82
- data/lib/rubocop/cop/rspec/capybara/visibility_matcher.rb +14 -14
- data/lib/rubocop/cop/rspec/change_by_zero.rb +1 -1
- data/lib/rubocop/cop/rspec/context_wording.rb +4 -2
- data/lib/rubocop/cop/rspec/example_wording.rb +32 -0
- data/lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb +99 -0
- data/lib/rubocop/cop/rspec/factory_bot/create_list.rb +2 -2
- data/lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb +1 -19
- data/lib/rubocop/cop/rspec/implicit_subject.rb +86 -19
- data/lib/rubocop/cop/rspec/let_before_examples.rb +15 -1
- data/lib/rubocop/cop/rspec/mixin/capybara_help.rb +80 -0
- data/lib/rubocop/cop/rspec/mixin/css_selector.rb +48 -1
- data/lib/rubocop/cop/rspec/mixin/skip_or_pending.rb +23 -0
- data/lib/rubocop/cop/rspec/no_expectation_example.rb +47 -6
- data/lib/rubocop/cop/rspec/pending.rb +2 -11
- data/lib/rubocop/cop/rspec/rails/inferred_spec_type.rb +135 -0
- data/lib/rubocop/cop/rspec/repeated_include_example.rb +1 -1
- data/lib/rubocop/cop/rspec/sort_metadata.rb +102 -0
- data/lib/rubocop/cop/rspec/subject_declaration.rb +1 -1
- data/lib/rubocop/cop/rspec_cops.rb +5 -0
- data/lib/rubocop/rspec/factory_bot/language.rb +20 -0
- data/lib/rubocop/rspec/version.rb +1 -1
- data/lib/rubocop-rspec.rb +2 -0
- metadata +9 -2
data/CHANGELOG.md
CHANGED
@@ -2,410 +2,433 @@
|
|
2
2
|
|
3
3
|
## Master (Unreleased)
|
4
4
|
|
5
|
+
## 2.14.0 (2022-10-23)
|
6
|
+
|
7
|
+
- Add `require_implicit` style to `RSpec/ImplicitSubject`. ([@r7kamura])
|
8
|
+
- Fix a false positive for `RSpec/Capybara/SpecificMatcher` when `have_css("a")` without attribute. ([@ydah])
|
9
|
+
- Update `RSpec/ExampleWording` cop to raise error for insufficient descriptions. ([@akrox58])
|
10
|
+
- Add new `RSpec/Capybara/NegationMatcher` cop. ([@ydah])
|
11
|
+
- Add `AllowedPatterns` configuration option to `RSpec/NoExpectationExample`. ([@ydah])
|
12
|
+
- Improve `RSpec/NoExpectationExample` cop to ignore examples skipped or pending via metadata. ([@pirj])
|
13
|
+
- Add `RSpec/FactoryBot/ConsistentParenthesesStyle` cop. ([@Liberatys])
|
14
|
+
- Add `RSpec/Rails/InferredSpecType` cop. ([@r7kamura])
|
15
|
+
- Add new `RSpec/Capybara/SpecificActions` cop. ([@ydah])
|
16
|
+
- Update `config/default.yml` removing deprecated option to make the config correctable by users. ([@ignaciovillaverde])
|
17
|
+
- Do not attempt to auto-correct example groups with `include_examples` in `RSpec/LetBeforeExamples`. ([@pirj])
|
18
|
+
- Add new `RSpec/SortMetadata` cop. ([@leoarnold])
|
19
|
+
- Add support for subject! method to `RSpec/SubjectDeclaration`. ([@ydah][])
|
20
|
+
|
21
|
+
## 2.13.2 (2022-09-23)
|
22
|
+
|
23
|
+
- Fix an error for `RSpec/Capybara/SpecificFinders` with no parentheses. ([@ydah])
|
24
|
+
- Fix a false positive for `RSpec/NoExpectationExample` with pending using `skip` or `pending` inside an example. ([@ydah])
|
25
|
+
- Exclude `have_text` and `have_content` that raise `ArgumentError` with `RSpec/Capybara/VisibilityMatcher` where `:visible` is an invalid option. ([@ydah])
|
26
|
+
- Fix a false negative for `RSpec/Capybara/VisibilityMatcher` with negative matchers. ([@ydah])
|
27
|
+
|
5
28
|
## 2.13.1 (2022-09-12)
|
6
29
|
|
7
|
-
|
30
|
+
- Include config/obsoletion.yml in the gemspec. ([@hosamaly])
|
8
31
|
|
9
32
|
## 2.13.0 (2022-09-12)
|
10
33
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
34
|
+
- Fix `RSpec/FilePath` cop missing mismatched expanded namespace. ([@sl4vr])
|
35
|
+
- Add new `AllowConsecutiveOneLiners` (default true) option for `Rspec/EmptyLineAfterHook` cop. ([@ngouy])
|
36
|
+
- Add autocorrect support for `RSpec/EmptyExampleGroup`. ([@r7kamura])
|
37
|
+
- Fix `RSpec/ChangeByZero` with compound expressions using `&` or `|` operators. ([@BrianHawley])
|
38
|
+
- Add `RSpec/NoExpectationExample`. ([@r7kamura])
|
39
|
+
- Add some expectation methods to default configuration. ([@r7kamura])
|
40
|
+
- Fix a false positive for `RSpec/Capybara/SpecificMatcher`. ([@ydah])
|
41
|
+
- Fix a false negative for `RSpec/Capybara/SpecificMatcher` for `have_field`. ([@ydah])
|
42
|
+
- Fix a false positive for `RSpec/Capybara/SpecificMatcher` when may not have a `href` by `have_link`. ([@ydah])
|
43
|
+
- Add `NegatedMatcher` configuration option to `RSpec/ChangeByZero`. ([@ydah])
|
44
|
+
- Add new `RSpec/Capybara/SpecificFinders` cop. ([@ydah])
|
45
|
+
- Add support for numblocks to `RSpec/AroundBlock`, `RSpec/EmptyLineAfterHook`, `RSpec/ExpectInHook`, `RSpec/HookArgument`, `RSpec/HooksBeforeExamples`, `RSpec/IteratedExpectation`, and `RSpec/NoExpectationExample`. ([@ydah])
|
46
|
+
- Fix incorrect documentation URLs when using `rubocop --show-docs-url`. ([@r7kamura])
|
47
|
+
- Add `AllowedGroups` configuration option to `RSpec/NestedGroups`. ([@ydah])
|
48
|
+
- Deprecate `IgnoredPatterns` option in favor of the `AllowedPatterns` options. ([@ydah])
|
49
|
+
- Add `AllowedPatterns` configuration option to `RSpec/ContextWording`. ([@ydah])
|
50
|
+
- Add `RSpec/ClassCheck` cop. ([@r7kamura])
|
51
|
+
- Fix a false positive for `RSpec/Capybara/SpecificMatcher` when pseudo-classes. ([@ydah])
|
52
|
+
- Fix a false negative for `RSpec/SubjectStub` when the subject is declared with the `subject!` method and called by name. ([@eikes])
|
53
|
+
- Support `Array.new(n)` on `RSpec/FactoryBot/CreateList` cop. ([@r7kamura])
|
31
54
|
|
32
55
|
## 2.12.1 (2022-07-03)
|
33
56
|
|
34
|
-
|
57
|
+
- Fix a false positive for `RSpec/Capybara/SpecificMatcher`. ([@ydah])
|
35
58
|
|
36
59
|
## 2.12.0 (2022-07-02)
|
37
60
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
61
|
+
- Fix incorrect path suggested by `RSpec/FilePath` cop when second argument contains spaces. ([@tejasbubane])
|
62
|
+
- Fix autocorrect for EmptyLineSeparation. ([@johnny-miyake])
|
63
|
+
- Add new `RSpec/Capybara/SpecificMatcher` cop. ([@ydah])
|
64
|
+
- Fixed false offense detection in `FactoryBot/CreateList` when a n.times block is including method calls in the factory create arguments. ([@ngouy])
|
65
|
+
- Fix error in `RSpec/RSpec/FactoryBot/CreateList` cop for empty block. ([@tejasbubane])
|
66
|
+
- Update `RSpec/MultipleExpectations` cop documentation with examples of aggregate_failures use. ([@edgibbs])
|
67
|
+
- Declare autocorrect as unsafe for `RSpec/VerifiedDoubleReference`. ([@Drowze])
|
68
|
+
- Add new `RSpec/Rails/HaveHttpStatus` cop. ([@akiomik])
|
46
69
|
|
47
70
|
## 2.11.1 (2022-05-18)
|
48
71
|
|
49
|
-
|
72
|
+
- Fix a regression in `RSpec/ExpectChange` flagging chained method calls. ([@pirj])
|
50
73
|
|
51
74
|
## 2.11.0 (2022-05-18)
|
52
75
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
76
|
+
- Drop Ruby 2.5 support. ([@ydah])
|
77
|
+
- Add new `RSpec/ChangeByZero` cop. ([@ydah])
|
78
|
+
- Improve `RSpec/ExpectChange` to detect namespaced and top-level constants. ([@M-Yamashita01])
|
79
|
+
- Introduce an amendment to `Metrics/BlockLength` to exclude spec files. ([@luke-hill])
|
57
80
|
|
58
81
|
## 2.10.0 (2022-04-19)
|
59
82
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
83
|
+
- Fix a false positive for `RSpec/EmptyExampleGroup` when expectations in case statement. ([@ydah])
|
84
|
+
- Add `RSpec/VerifiedDoubleReference` cop. ([@t3h2mas])
|
85
|
+
- Make `RSpec/BeNil` cop configurable with a `be_nil` style and a `be` style. ([@bquorning])
|
86
|
+
- Fix `Capybara/CurrentPathExpectation` autocorrect incompatible with `Style/TrailingCommaInArguments` autocorrect. ([@ydah])
|
64
87
|
|
65
88
|
## 2.9.0 (2022-02-28)
|
66
89
|
|
67
|
-
|
68
|
-
|
90
|
+
- Add new `RSpec/BeNil` cop. ([@bquorning])
|
91
|
+
- Add new `RSpec/BeEq` cop. ([@bquorning])
|
69
92
|
|
70
93
|
## 2.8.0 (2022-01-24)
|
71
94
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
95
|
+
- Fix `RSpec/FactoryBot/SyntaxMethods` and `RSpec/Capybara/FeatureMethods` to inspect shared groups. ([@pirj])
|
96
|
+
- Fix `RSpec/LeadingSubject` failure in non-spec code. ([@pirj])
|
97
|
+
- Add bad example to `RSpec/SubjectStub` cop. ([@oshiro3])
|
98
|
+
- Replace non-styleguide cops `StyleGuide` attribute with `Reference`. ([@pirj])
|
99
|
+
- Fix `RSpec/SubjectStub` to disallow stubbing of subjects defined in parent example groups. ([@pirj])
|
77
100
|
|
78
101
|
## 2.7.0 (2021-12-26)
|
79
102
|
|
80
|
-
|
81
|
-
|
103
|
+
- Add new `RSpec/FactoryBot/SyntaxMethods` cop. ([@leoarnold])
|
104
|
+
- Exclude `task` type specs from `RSpec/DescribeClass` cop. ([@harry-graham])
|
82
105
|
|
83
106
|
## 2.6.0 (2021-11-08)
|
84
107
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
108
|
+
- Fix merging RSpec DSL configuration from third-party gems. ([@pirj])
|
109
|
+
- Fix `RSpec/ExcessiveDocstringSpacing` false positive for multi-line indented strings. ([@G-Rath])
|
110
|
+
- Fix `Include` configuration for sub-departments. ([@pirj])
|
111
|
+
- Ignore heredocs in `RSpec/ExcessiveDocstringSpacing`. ([@G-Rath])
|
112
|
+
- Stop `RSpec/ExampleWording` from trying to correct heredocs. ([@G-Rath])
|
113
|
+
- Add autocorrect support for `RSpec/VariableDefinition`. ([@r7kamura])
|
91
114
|
|
92
115
|
## 2.5.0 (2021-09-21)
|
93
116
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
117
|
+
- Declare autocorrect as unsafe for `ExpectChange`. ([@francois-ferrandis])
|
118
|
+
- Fix each example for `RSpec/HookArgument`. ([@lokhi])
|
119
|
+
- Exclude unrelated Rails directories from `RSpec/DescribeClass`. ([@MothOnMars])
|
120
|
+
- Add `RSpec/ExcessiveDocstringSpacing` cop. ([@G-Rath])
|
121
|
+
- Add `RSpec/SubjectDeclaration` cop. ([@dswij])
|
122
|
+
- Fix excessive whitespace removal in `RSpec/EmptyHook` autocorrection. ([@pirj])
|
123
|
+
- Bump RuboCop requirement to v1.19.0. ([@pirj])
|
124
|
+
- Fix false positive in `RSpec/IteratedExpectation` when there is single, non-expectation statement in the block body. ([@Darhazer])
|
102
125
|
|
103
126
|
## 2.4.0 (2021-06-09)
|
104
127
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
128
|
+
- Update `RSpec/FilePath` to check suffix when given a non-constant top-level node (e.g. features). ([@topalovic])
|
129
|
+
- Add missing documentation for `single_statement_only` style of `RSpec/ImplicitSubject` cop. ([@tejasbubane])
|
130
|
+
- Fix an exception in `DescribedClass` when accessing a constant on a variable in a spec that is nested in a namespace. ([@rrosenblum])
|
131
|
+
- Add new `RSpec/IdenticalEqualityAssertion` cop. ([@tejasbubane])
|
132
|
+
- Add `RSpec/Rails/AvoidSetupHook` cop. ([@paydaylight])
|
133
|
+
- Fix false negative in `RSpec/ExpectChange` cop with block style and chained method call. ([@tejasbubane])
|
111
134
|
|
112
135
|
## 2.3.0 (2021-04-28)
|
113
136
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
137
|
+
- Allow `RSpec/ContextWording` to accept multi-word prefixes. ([@hosamaly])
|
138
|
+
- Drop support for ruby 2.4. ([@bquorning])
|
139
|
+
- Add `CountAsOne` configuration option to `RSpec/ExampleLength`. ([@stephannv])
|
140
|
+
- Fix a false positive for `RSpec/RepeatedExampleGroupBody` when `pending` or `skip` have argument(s). ([@Tietew])
|
118
141
|
|
119
142
|
## 2.2.0 (2021-02-02)
|
120
143
|
|
121
|
-
|
122
|
-
|
123
|
-
|
144
|
+
- Fix `HooksBeforeExamples`, `LeadingSubject`, `LetBeforeExamples` and `ScatteredLet` autocorrection to take into account inline comments and comments immediately before the moved node. ([@Darhazer])
|
145
|
+
- Improve rubocop-rspec performance. ([@Darhazer], [@bquorning])
|
146
|
+
- Include `Enabled: true` to prevent a mismatched configuration parameter warning when `RSpec` cops are explicitly enabled in the user configuration. ([@pirj])
|
124
147
|
|
125
148
|
## 2.1.0 (2020-12-17)
|
126
149
|
|
127
|
-
|
128
|
-
|
150
|
+
- Fix `RSpec/FilePath` false positive for relative file path runs with long namespaces. ([@ahukkanen])
|
151
|
+
- Update `RSpec/Focus` to have auto-correction. ([@dvandersluis])
|
129
152
|
|
130
153
|
## 2.0.1 (2020-12-02)
|
131
154
|
|
132
|
-
|
155
|
+
- Fixed infinite loop in `RSpec/ExpectActual` autocorrection when both expected and actual values are literals. ([@Darhazer])
|
133
156
|
|
134
157
|
## 2.0.0 (2020-11-06)
|
135
158
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
159
|
+
- Remove deprecated class `::RuboCop::Cop::RSpec::Cop`. ([@bquorning])
|
160
|
+
- Retire `RSpec/InvalidPredicateMatcher` cop. ([@pirj])
|
161
|
+
- Remove the code responsible for filtering files to inspect. ([@pirj])
|
162
|
+
- Make RSpec language elements configurable. ([@sl4vr])
|
163
|
+
- Remove `CustomIncludeMethods` `RSpec/EmptyExampleGroup` option in favour of the new RSpec DSL configuration. ([@pirj])
|
164
|
+
- Enabled pending cop (`RSpec/StubbedMock`). ([@pirj])
|
142
165
|
|
143
166
|
## 2.0.0.pre (2020-10-22)
|
144
167
|
|
145
|
-
|
146
|
-
|
168
|
+
- Update RuboCop dependency to v1.0.0. ([@bquorning])
|
169
|
+
- Change namespace of several cops (`Capybara/*` -> `RSpec/Capybara/*`, `FactoryBot/*` -> `RSpec/FactoryBot/*`, `Rails/*` -> `RSpec/Rails/*`). ([@pirj], [@bquorning])
|
147
170
|
|
148
171
|
## 1.44.1 (2020-10-20)
|
149
172
|
|
150
|
-
|
173
|
+
- Relax `rubocop-ast` version constraint. ([@PhilCoggins])
|
151
174
|
|
152
175
|
## 1.44.0 (2020-10-20)
|
153
176
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
177
|
+
- Move our documentation from rubocop-rspec.readthedocs.io to docs.rubocop.org/rubocop-rspec. ([@bquorning])
|
178
|
+
- Add `RSpec/RepeatedIncludeExample` cop. ([@biinari])
|
179
|
+
- Add `RSpec/StubbedMock` cop. ([@bquorning], [@pirj])
|
180
|
+
- Add `IgnoredMetadata` configuration option to `RSpec/DescribeClass`. ([@Rafix02])
|
181
|
+
- Fix false positives in `RSpec/EmptyExampleGroup`. ([@pirj])
|
182
|
+
- Fix a false positive for `RSpec/EmptyExampleGroup` when example is defined in an `if` branch. ([@koic])
|
160
183
|
|
161
184
|
## 1.43.2 (2020-08-25)
|
162
185
|
|
163
|
-
|
164
|
-
|
186
|
+
- Fix `RSpec/FilePath` when checking a file with a shared example. ([@pirj])
|
187
|
+
- Fix subject nesting detection in `RSpec/LeadingSubject`. ([@pirj])
|
165
188
|
|
166
189
|
## 1.43.1 (2020-08-17)
|
167
190
|
|
168
|
-
|
191
|
+
- Fix `RSpec/FilePath` when checking a file defining e.g. an empty class. ([@bquorning])
|
169
192
|
|
170
193
|
## 1.43.0 (2020-08-17)
|
171
194
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
195
|
+
- 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])
|
196
|
+
- Add support for subject detection after includes and example groups in `RSpec/LeadingSubject`. ([@pirj])
|
197
|
+
- Ignore trailing punctuation in context description prefix. ([@elliterate])
|
198
|
+
- Relax `RSpec/VariableDefinition` cop so interpolated and multiline strings are accepted even when configured to enforce the `symbol` style. ([@bquorning])
|
199
|
+
- Fix `RSpec/EmptyExampleGroup` to flag example groups with examples in invalid scopes. ([@mlarraz])
|
200
|
+
- Fix `RSpec/EmptyExampleGroup` to ignore examples groups with examples defined inside iterators. ([@pirj])
|
201
|
+
- Improve `RSpec/NestedGroups`, `RSpec/FilePath`, `RSpec/DescribeMethod`, `RSpec/MultipleDescribes`, `RSpec/DescribeClass`'s top-level example group detection. ([@pirj])
|
202
|
+
- Add detection of `let!` with a block-pass or a string literal to `RSpec/LetSetup`. ([@pirj])
|
203
|
+
- Add `IgnoredPatterns` configuration option to `RSpec/VariableName`. ([@jtannas])
|
204
|
+
- Add `RSpec/MultipleMemoizedHelpers` cop. ([@mockdeep])
|
182
205
|
|
183
206
|
## 1.42.0 (2020-07-09)
|
184
207
|
|
185
|
-
|
208
|
+
- Update RuboCop dependency to 0.87.0 because of changes to internal APIs. ([@bquorning], [@Darhazer])
|
186
209
|
|
187
210
|
## 1.41.0 (2020-07-03)
|
188
211
|
|
189
|
-
|
190
|
-
|
191
|
-
|
212
|
+
- Extend the list of Rails spec types for `RSpec/DescribeClass`. ([@pirj])
|
213
|
+
- Fix `FactoryBot/AttributeDefinedStatically` to allow `#traits_for_enum` without a block. ([@harrylewis])
|
214
|
+
- Improve the performance of `FactoryBot/AttributeDefinedStatically`, `RSpec/InstanceVariable`, `RSpec/LetSetup`, `RSpec/NestedGroups` and `RSpec/ReturnFromStub`. ([@andrykonchin])
|
192
215
|
|
193
216
|
## 1.40.0 (2020-06-11)
|
194
217
|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
218
|
+
- Add new `RSpec/VariableName` cop. ([@tejasbubane])
|
219
|
+
- Add new `RSpec/VariableDefinition` cop. ([@tejasbubane])
|
220
|
+
- Expand `Capybara/VisibilityMatcher` to support more than just `have_selector`. ([@twalpole])
|
221
|
+
- Add new `SpecSuffixOnly` option to `RSpec/FilePath` cop. ([@zdennis])
|
222
|
+
- Allow `RSpec/RepeatedExampleGroupBody` to differ only by described_class. ([@robotdana])
|
223
|
+
- Fix `RSpec/FilePath` detection across sibling directories. ([@rolfschmidt])
|
224
|
+
- Improve the performance of `RSpec/SubjectStub` by an order of magnitude. ([@andrykonchin])
|
202
225
|
|
203
226
|
## 1.39.0 (2020-05-01)
|
204
227
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
228
|
+
- Fix `RSpec/FilePath` detection when absolute path includes test subject. ([@eitoball])
|
229
|
+
- Add new `Capybara/VisibilityMatcher` cop. ([@aried3r])
|
230
|
+
- Ignore String constants by `RSpec/Describe`. ([@AlexWayfer])
|
231
|
+
- Drop support for ruby 2.3. ([@bquorning])
|
232
|
+
- Fix multiple cops to detect `let` with proc argument. ([@tejasbubane])
|
233
|
+
- Add autocorrect support for `RSpec/ScatteredLet`. ([@Darhazer])
|
234
|
+
- Add new `RSpec/EmptyHook` cop. ([@tejasbubane])
|
212
235
|
|
213
236
|
## 1.38.1 (2020-02-15)
|
214
237
|
|
215
|
-
|
238
|
+
- Fix `RSpec/RepeatedDescription` to detect descriptions with interpolation and methods. ([@lazycoder9])
|
216
239
|
|
217
240
|
## 1.38.0 (2020-02-11)
|
218
241
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
242
|
+
- Fix `RSpec/InstanceVariable` detection inside custom matchers. ([@pirj])
|
243
|
+
- Fix `RSpec/ScatteredSetup` to distinguish hooks with different metadata. ([@pirj])
|
244
|
+
- Add autocorrect support for `RSpec/ExpectActual` cop. ([@dduugg], [@pirj])
|
245
|
+
- Add `RSpec/RepeatedExampleGroupBody` cop. ([@lazycoder9])
|
246
|
+
- Add `RSpec/RepeatedExampleGroupDescription` cop. ([@lazycoder9])
|
247
|
+
- Add block name and other lines to `RSpec/ScatteredSetup` message. ([@elebow])
|
248
|
+
- Fix `RSpec/RepeatedDescription` to take into account example metadata. ([@lazycoder9])
|
226
249
|
|
227
250
|
## 1.37.1 (2019-12-16)
|
228
251
|
|
229
|
-
|
230
|
-
|
252
|
+
- Improve message and description of `FactoryBot/FactoryClassName`. ([@ybiquitous])
|
253
|
+
- Fix `FactoryBot/FactoryClassName` to ignore `Hash` and `OpenStruct`. ([@jfragoulis])
|
231
254
|
|
232
255
|
## 1.37.0 (2019-11-25)
|
233
256
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
257
|
+
- Implement `RSpec/DescribedClassModuleWrapping` to disallow RSpec statements within a module. ([@kellysutton])
|
258
|
+
- Fix documentation rake task to support Rubocop 0.75. ([@nickcampbell18])
|
259
|
+
- Fix `RSpec/SubjectStub` to detect implicit subjects stubbed. ([@QQism])
|
260
|
+
- Fix `RSpec/Pending` not flagging `skip` with string values. ([@pirj])
|
261
|
+
- Add `AllowedExplicitMatchers` config option for `RSpec/PredicateMatcher`. ([@mkrawc])
|
262
|
+
- Add `FactoryBot/FactoryClassName` cop. ([@jfragoulis])
|
240
263
|
|
241
264
|
## 1.36.0 (2019-09-27)
|
242
265
|
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
266
|
+
- Fix `RSpec/DescribedClass`'s error when `described_class` is used as part of a constant. ([@pirj])
|
267
|
+
- Fix `RSpec/ExampleWording` autocorrect of multi-line docstrings. ([@pirj])
|
268
|
+
- Add `RSpec/ContextMethod` cop, to detect method names in `context`. ([@geniou])
|
269
|
+
- Update RuboCop dependency to 0.68.1 with support for children matching node pattern syntax. ([@pirj])
|
270
|
+
- Add `RSpec/EmptyLineAfterExample` cop to check that there is an empty line after example blocks. ([@pirj])
|
271
|
+
- Fix `Capybara/CurrentPathExpectation` auto-corrector, to include option `ignore_query: true`. ([@onumis])
|
272
|
+
- Fix `RSpec/Focus` detecting mixed array/hash metadata. ([@dgollahon])
|
273
|
+
- Fix `RSpec/Focus` to also detect `pending` examples. ([@dgollahon])
|
251
274
|
|
252
275
|
## 1.35.0 (2019-08-02)
|
253
276
|
|
254
|
-
|
277
|
+
- Add `RSpec/ImplicitBlockExpectation` cop. ([@pirj])
|
255
278
|
|
256
279
|
## 1.34.1 (2019-07-31)
|
257
280
|
|
258
|
-
|
281
|
+
- Fix `RSpec/DescribedClass`'s error when a local variable is part of the namespace. ([@pirj])
|
259
282
|
|
260
283
|
## 1.34.0 (2019-07-23)
|
261
284
|
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
285
|
+
- Remove `AggregateFailuresByDefault` config option of `RSpec/MultipleExpectations`. ([@pirj])
|
286
|
+
- Add `RSpec/LeakyConstantDeclaration` cop. ([@jonatas], [@pirj])
|
287
|
+
- Improve `aggregate_failures` metadata detection of `RSpec/MultipleExpectations`. ([@pirj])
|
288
|
+
- Improve `RSpec/SubjectStub` detection and message. ([@pirj])
|
289
|
+
- Change message of `RSpec/LetSetup` cop to be more descriptive. ([@foton])
|
290
|
+
- Improve `RSpec/ExampleWording` to handle interpolated example messages. ([@nc-holodakg])
|
291
|
+
- Improve detection by allowing the use of `RSpec` as a top-level constant. ([@pirj])
|
292
|
+
- Fix `RSpec/DescribedClass`'s incorrect detection. ([@pirj])
|
293
|
+
- Improve `RSpec/DescribedClass`'s ability to detect inside modules and classes. ([@pirj])
|
271
294
|
|
272
295
|
## 1.33.0 (2019-05-13)
|
273
296
|
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
297
|
+
- Let `RSpec/DescribedClass` pass `Struct` instantiation closures. ([@schmijos])
|
298
|
+
- Fixed `RSpec/ContextWording` missing `context`s with metadata. ([@pirj])
|
299
|
+
- Fix `FactoryBot/AttributeDefinedStatically` not working with an explicit receiver. ([@composerinteralia])
|
300
|
+
- Add `RSpec/Dialect` enforces custom RSpec dialects. ([@gsamokovarov])
|
301
|
+
- Fix redundant blank lines in `RSpec/MultipleSubjects`'s autocorrect. ([@pirj])
|
302
|
+
- Drop support for ruby `2.2`. ([@bquorning])
|
280
303
|
|
281
304
|
## 1.32.0 (2019-01-27)
|
282
305
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
306
|
+
- Add `RSpec/Yield` cop, suggesting using the `and_yield` method when stubbing a method, accepting a block. ([@Darhazer])
|
307
|
+
- Fix `FactoryBot/CreateList` autocorrect crashing when the factory is called with a block=. ([@Darhazer])
|
308
|
+
- Fixed `RSpec/Focus` not flagging some cases of `RSpec.describe` with `focus: true`. ([@Darhazer])
|
309
|
+
- Fixed `RSpec/Pending` not flagging some cases of `RSpec.describe` with `:skip`. ([@Darhazer])
|
310
|
+
- 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])
|
288
311
|
|
289
312
|
## 1.31.0 (2019-01-02)
|
290
313
|
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
314
|
+
- Add `IgnoreSharedExamples` option for `RSpec/NamedSubject`. ([@RST-J])
|
315
|
+
- Add autocorrect support for `Capybara/CurrentPathExpectation` cop. ([@ypresto])
|
316
|
+
- Add support for built-in `exists` matcher for `RSpec/PredicateMatcher` cop. ([@mkenyon])
|
317
|
+
- `SingleArgumentMessageChain` no longer reports an array as it's only argument as an offense. ([@Darhazer])
|
295
318
|
|
296
319
|
## 1.30.1 (2018-11-01)
|
297
320
|
|
298
|
-
|
321
|
+
- `FactoryBot/CreateList` now ignores `times` blocks with an argument. ([@Darhazer])
|
299
322
|
|
300
323
|
## 1.30.0 (2018-10-08)
|
301
324
|
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
325
|
+
- Add config to `RSpec/VerifiedDoubles` to enforcement of verification on unnamed doubles. ([@BrentWheeldon])
|
326
|
+
- Fix `FactoryBot/AttributeDefinedStatically` not working when there is a non-symbol key. ([@vzvu3k6k])
|
327
|
+
- Fix false positive in `RSpec/ImplicitSubject` when `is_expected` is used inside `its()` block. ([@Darhazer])
|
328
|
+
- Add `single_statement_only` style to `RSpec/ImplicitSubject` as a more relaxed alternative to `single_line_only`. ([@Darhazer])
|
329
|
+
- Add `RSpec/UnspecifiedException` as a default cop to encourage more-specific `expect{}.to raise_error(ExceptionType)`, or `raise_exception` style handling of exceptions. ([@daveworth])
|
307
330
|
|
308
331
|
## 1.29.1 (2018-09-01)
|
309
332
|
|
310
|
-
|
311
|
-
|
333
|
+
- Fix false negative in `FactoryBot/AttributeDefinedStatically` when attribute is defined on `self`. ([@Darhazer])
|
334
|
+
- `RSpec/FactoryBot` cops will now also inspect the `spec/factories.rb` path by default. ([@bquorning])
|
312
335
|
|
313
336
|
## 1.29.0 (2018-08-25)
|
314
337
|
|
315
|
-
|
316
|
-
|
317
|
-
|
338
|
+
- `RSpec/InstanceVariable` - Recommend local variables in addition to `let`. ([@jaredbeck])
|
339
|
+
- Add `RSpec/ImplicitSubject` cop. ([@Darhazer])
|
340
|
+
- Add `RSpec/HooksBeforeExamples` cop. ([@Darhazer])
|
318
341
|
|
319
342
|
## 1.28.0 (2018-08-14)
|
320
343
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
344
|
+
- Add `RSpec/ReceiveNever` cop enforcing usage of `not_to receive` instead of `never` matcher. ([@Darhazer])
|
345
|
+
- Fix false positive in `RSpec/EmptyLineAfterExampleGroup` cop when example is inside `if`. ([@Darhazer])
|
346
|
+
- Add `RSpec/MissingExampleGroupArgument` to enforce first argument for an example group. ([@geniou])
|
347
|
+
- Drop support for ruby `2.1`. ([@bquorning])
|
348
|
+
- Add `FactoryBot/AttributeDefinedStatically` cop to help FactoryBot users with the deprecation of static attributes. ([@composerinteralia], [@seanpdoyle])
|
349
|
+
- Remove `FactoryBot/DynamicAttributeDefinedStatically` and `FactoryBot/StaticAttributeDefinedDynamically` cops. ([@composerinteralia])
|
327
350
|
|
328
351
|
## 1.27.0 (2018-06-14)
|
329
352
|
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
353
|
+
- `RSpec/LeadingSubject` now enforces subject to be before any examples, hooks or let declarations. ([@Darhazer])
|
354
|
+
- Fix `RSpec/NotToNot` to highlight only the selector (`not_to` or `to_not`), so it works also on `expect { ... }` blocks. ([@bquorning])
|
355
|
+
- Add `RSpec/EmptyLineAfterHook` cop. ([@bquorning])
|
356
|
+
- Add `RSpec/EmptyLineAfterExampleGroup` cop to check that there is an empty line after example group blocks. ([@bquorning])
|
357
|
+
- Fix `RSpec/DescribeClass` crashing on `RSpec.describe` without arguments. ([@Darhazer])
|
358
|
+
- Bump RuboCop requirement to v0.56.0. ([@bquorning])
|
359
|
+
- Fix `RSpec/OverwritingSetup` crashing if a variable is used as an argument for `let`. ([@Darhazer])
|
337
360
|
|
338
361
|
## 1.26.0 (2018-06-06)
|
339
362
|
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
363
|
+
- Fix false positive in `RSpec/EmptyExampleGroup` cop when methods named like a RSpec method are used. ([@Darhazer])
|
364
|
+
- Fix `Capybara/FeatureMethods` not working when there is require before the spec. ([@Darhazer])
|
365
|
+
- Fix `RSpec/EmptyLineAfterFinalLet`: allow a comment to be placed after latest let, requiring empty line after the comment. ([@Darhazer])
|
366
|
+
- Add `RSpec/ReceiveCounts` cop to enforce usage of :once and :twice matchers. ([@Darhazer])
|
344
367
|
|
345
368
|
## 1.25.1 (2018-04-10)
|
346
369
|
|
347
|
-
|
348
|
-
|
370
|
+
- Fix false positive in `RSpec/Pending` cop when pending is used as a method name. ([@Darhazer])
|
371
|
+
- Fix `FactoryBot/DynamicAttributeDefinedStatically` false positive when using symbol proc argument for a sequence. ([@tdeo])
|
349
372
|
|
350
373
|
## 1.25.0 (2018-04-07)
|
351
374
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
375
|
+
- Add `RSpec/SharedExamples` cop to enforce consistent usage of string to titleize shared examples. ([@anthony-robin])
|
376
|
+
- Add `RSpec/Be` cop to enforce passing argument to the generic `be` matcher. ([@Darhazer])
|
377
|
+
- Fix false positives in `StaticAttributeDefinedDynamically` and `ReturnFromStub` when a const is used in an array or hash. ([@Darhazer])
|
378
|
+
- Add `RSpec/Pending` cop to enforce no existing pending or skipped examples. This is disabled by default. ([@patrickomatic])
|
379
|
+
- Fix `RSpec/NestedGroups` cop support --auto-gen-config. ([@walf443])
|
380
|
+
- Fix false positives in `Capybara/FeatureMethods` when feature methods are used as property names in a factory. ([@Darhazer])
|
381
|
+
- Allow configuring enabled methods in `Capybara/FeatureMethods`. ([@Darhazer])
|
382
|
+
- Add `FactoryBot/CreateList` cop. ([@Darhazer])
|
360
383
|
|
361
384
|
## 1.24.0 (2018-03-06)
|
362
385
|
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
386
|
+
- Compatibility with RuboCop v0.53.0. ([@bquorning])
|
387
|
+
- The `Rails/HttpStatus` cop is unavailable if the `rack` gem cannot be loaded. ([@bquorning])
|
388
|
+
- Fix `Rails/HttpStatus` not working with custom HTTP status codes. ([@bquorning])
|
389
|
+
- Fix `FactoryBot/StaticAttributeDefinedDynamically` to handle empty block. ([@abrom])
|
390
|
+
- Fix false positive in `FactoryBot/DynamicAttributeDefinedStatically` when a before/after callback has a symbol proc argument. ([@abrom])
|
368
391
|
|
369
392
|
## 1.23.0 (2018-02-23)
|
370
393
|
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
394
|
+
- Add `RSpec/Rails/HttpStatus` cop to enforce consistent usage of the status format (numeric or symbolic). ([@anthony-robin], [@jojos003])
|
395
|
+
- Fix false negative in `RSpec/ReturnFromStub` when a constant is being returned by the stub. ([@Darhazer])
|
396
|
+
- Fix `FactoryBot/DynamicAttributeDefinedStatically` to handle dynamic attributes inside arrays/hashes. ([@abrom])
|
397
|
+
- Add `FactoryBot/StaticAttributeDefinedDynamically` (based on dynamic attribute cop). ([@abrom])
|
375
398
|
|
376
399
|
## 1.22.2 (2018-02-01)
|
377
400
|
|
378
|
-
|
401
|
+
- Fix error in `RSpec/DescribedClass` when working on an empty `describe` block. ([@bquorning])
|
379
402
|
|
380
403
|
## 1.22.1 (2018-01-17)
|
381
404
|
|
382
|
-
|
405
|
+
- Fix false positives in `RSpec/ReturnFromStub`. ([@Darhazer])
|
383
406
|
|
384
407
|
## 1.22.0 (2018-01-10)
|
385
408
|
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
409
|
+
- Updates `describe_class` to account for RSpecs `:system` wrapper of rails system tests. ([@EliseFitz15])
|
410
|
+
- Add `RSpec/ExpectChange` cop to enforce consistent usage of the change matcher. ([@Darhazer])
|
411
|
+
- Add autocorrect support to `RSpec/LetBeforeExamples`. ([@Darhazer])
|
412
|
+
- Fix `RSpec/InstanceVariable` flagging instance variables inside dynamically defined class. ([@Darhazer])
|
413
|
+
- Add autocorrect support for `RSpec/ReturnFromStub` cop. ([@bquorning])
|
414
|
+
- Add `RSpec/ExampleWithoutDescription` cop. ([@Darhazer])
|
392
415
|
|
393
416
|
## 1.21.0 (2017-12-13)
|
394
417
|
|
395
|
-
|
396
|
-
|
397
|
-
|
418
|
+
- Compatibility with RuboCop v0.52.0. ([@bquorning])
|
419
|
+
- Improve performance when user does not override default RSpec Pattern config. ([@walf443])
|
420
|
+
- Add `AggregateFailuresByDefault` configuration for `RSpec/MultipleExpectations` cop. ([@onk])
|
398
421
|
|
399
422
|
## 1.20.1 (2017-11-15)
|
400
423
|
|
401
|
-
|
424
|
+
- Add "without" to list of default allowed prefixes for `RSpec/ContextWording`. ([@bquorning])
|
402
425
|
|
403
426
|
## 1.20.0 (2017-11-09)
|
404
427
|
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
428
|
+
- Rename namespace `FactoryGirl` to `FactoryBot` following original library update. ([@walf443])
|
429
|
+
- Fix exception in `RSpec/ReturnFromStub` on empty block. ([@yevhene])
|
430
|
+
- Add `RSpec/ContextWording` cop. ([@pirj], [@telmofcosta])
|
431
|
+
- Fix `RSpec/SubjectStub` cop matches receive message inside all matcher. ([@walf443])
|
409
432
|
|
410
433
|
## 1.19.0 (2017-10-18)
|
411
434
|
|
@@ -413,234 +436,235 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
|
|
413
436
|
|
414
437
|
## 1.18.0 (2017-09-29)
|
415
438
|
|
416
|
-
|
417
|
-
|
418
|
-
|
439
|
+
- Fix false positive in `Capybara/FeatureMethods`. ([@Darhazer])
|
440
|
+
- Add `RSpec/Capybara/CurrentPathExpectation` cop for feature specs, disallowing setting expectations on `current_path`. ([@timrogers])
|
441
|
+
- Fix false positive in `RSpec/LetBeforeExamples` cop when example group contains single let. ([@Darhazer])
|
419
442
|
|
420
443
|
## 1.17.1 (2017-09-20)
|
421
444
|
|
422
|
-
|
423
|
-
|
445
|
+
- Improved `RSpec/ReturnFromStub` to handle string interpolation, hashes and do..end blocks. ([@Darhazer])
|
446
|
+
- Fixed compatibility with JRuby. ([@zverok])
|
424
447
|
|
425
448
|
## 1.17.0 (2017-09-14)
|
426
449
|
|
427
|
-
|
428
|
-
|
450
|
+
- Add `RSpec/Capybara` namespace including the first cop for feature specs: `Capybara/FeatureMethods`. ([@rspeicher])
|
451
|
+
- Update to RuboCop 0.50.0. ([@bquorning])
|
429
452
|
|
430
453
|
## 1.16.0 (2017-09-06)
|
431
454
|
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
455
|
+
- Add `RSpec/FactoryGirl` namespace including the first cop for factories: `FactoryGirl/DynamicAttributeDefinedStatically`. ([@jonatas])
|
456
|
+
- Add disabled by default `RSpec/AlignLeftLetBrace`. ([@backus])
|
457
|
+
- Add disabled by default `RSpec/AlignRightLetBrace`. ([@backus])
|
458
|
+
- Add `RSpec/LetBeforeExamples` cop. ([@Darhazer])
|
459
|
+
- Add `RSpec/MultipleSubjects` cop. ([@backus])
|
460
|
+
- Add `RSpec/ReturnFromStub` cop. ([@Darhazer])
|
461
|
+
- Add `RSpec/VoidExpect` cop. ([@pocke])
|
462
|
+
- Add `RSpec/InvalidPredicateMatcher` cop. ([@pocke])
|
463
|
+
- Change HookArgument cop to detect when hook has a receiver. ([@pocke])
|
464
|
+
- Add `RSpec/PredicateMatcher` cop. ([@pocke])
|
465
|
+
- Add `RSpec/ExpectInHook` cop. ([@pocke])
|
466
|
+
- `RSpec/MultipleExpectations` now detects usage of expect_any_instance_of. ([@Darhazer])
|
467
|
+
- `RSpec/MultipleExpectations` now detects usage of is_expected. ([@bmorrall])
|
445
468
|
|
446
469
|
## 1.15.1 (2017-04-30)
|
447
470
|
|
448
|
-
|
449
|
-
|
450
|
-
|
471
|
+
- Fix the handling of various edge cases in the `RSpec/ExampleWording` cop, including one that would cause autocorrect to crash. ([@dgollahon])
|
472
|
+
- Fix `RSpec/IteratedExpectation` crashing when there is an assignment in the iteration. ([@Darhazer])
|
473
|
+
- Fix false positive in `RSpec/SingleArgumentMessageChain` cop when the single argument is a hash. ([@Darhazer])
|
451
474
|
|
452
475
|
## 1.15.0 (2017-03-24)
|
453
476
|
|
454
|
-
|
455
|
-
|
477
|
+
- Add `RSpec/DescribeSymbol` cop. ([@rspeicher])
|
478
|
+
- Fix error when `RSpec/OverwritingSetup` and `RSpec/ScatteredLet` analyzed empty example groups. ([@backus])
|
456
479
|
|
457
480
|
## 1.14.0 (2017-03-24)
|
458
481
|
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
482
|
+
- Add `RSpec/OverwritingSetup` cop. ([@Darhazer])
|
483
|
+
- Add autocorrect support for `RSpec/LeadingSubject` cop. ([@Darhazer])
|
484
|
+
- Add `RSpec/ScatteredLet` cop. ([@Darhazer])
|
485
|
+
- Add `RSpec/IteratedExpectation` cop. ([@Darhazer])
|
486
|
+
- Add `RSpec/EmptyLineAfterSubject` cop. ([@Darhazer])
|
487
|
+
- Add `RSpec/EmptyLineAfterFinalLet` cop. ([@Darhazer])
|
465
488
|
|
466
489
|
## 1.13.0 (2017-03-07)
|
467
490
|
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
491
|
+
- Add repeated 'it' detection to `RSpec/ExampleWording` cop. ([@dgollahon])
|
492
|
+
- Add \[observed_nesting/max_nesting\] info to `RSpec/NestedGroups` messages. ([@dgollahon])
|
493
|
+
- Add `RSpec/ItBehavesLike` cop. ([@dgollahon])
|
494
|
+
- Add `RSpec/SharedContext` cop. ([@Darhazer])
|
495
|
+
- `RSpec/MultipleExpectations`: Count aggregate_failures block as single expectation. ([@Darhazer])
|
496
|
+
- Fix `ExpectActual` cop flagging `rspec-rails` routing specs. ([@backus])
|
497
|
+
- Fix `FilePath` cop not registering offenses for files like `spec/blog/user.rb` when it should be `spec/blog/user_spec.rb`. ([@backus])
|
475
498
|
|
476
499
|
## 1.12.0 (2017-02-21)
|
477
500
|
|
478
|
-
|
479
|
-
|
501
|
+
- Add `RSpec/InstanceSpy` cop. ([@Darhazer])
|
502
|
+
- Add `RSpec/BeforeAfterAll` for avoiding leaky global test setup. ([@cfabianski])
|
480
503
|
|
481
504
|
## 1.11.0 (2017-02-16)
|
482
505
|
|
483
|
-
|
484
|
-
|
485
|
-
|
506
|
+
- Add `AroundBlock` cop. ([@Darhazer])
|
507
|
+
- Add `EnforcedStyle` configuration for `RSpec/DescribedClass` cop. ([@Darhazer])
|
508
|
+
- Fix false positive for `RSpec/RepeatedExample` cop. ([@redross])
|
486
509
|
|
487
510
|
## 1.10.0 (2017-01-15)
|
488
511
|
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
512
|
+
- Fix false negative for `RSpec/MessageSpies` cop. ([@onk])
|
513
|
+
- Fix internal dependencies on RuboCop to be compatible with 0.47 release. ([@backus])
|
514
|
+
- Add autocorrect support for `SingleArgumentMessageChain` cop. ([@bquorning])
|
515
|
+
- Rename `NestedGroups`' configuration key from `MaxNesting` to `Max` in order to be consistent with other cop configuration. ([@backus])
|
516
|
+
- Add `RepeatedExample` cop for detecting repeated examples within example groups. ([@backus])
|
517
|
+
- Add `ScatteredSetup` cop for enforcing that only one `before`, `around`, and `after` hook are used per example group scope. ([@backus])
|
518
|
+
- Add `ExpectOutput` cop for recommending `expect { ... }.to output(...).to_stdout`. ([@backus])
|
496
519
|
|
497
520
|
## 1.9.1 (2017-01-02)
|
498
521
|
|
499
|
-
|
500
|
-
|
522
|
+
- Fix unintentional regression change in `NestedGroups` reported in #270. ([@backus])
|
523
|
+
- Change `MaxNesting` for `NestedGroups` from 2 to 3. ([@backus])
|
501
524
|
|
502
525
|
## 1.9.0 (2016-12-29)
|
503
526
|
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
527
|
+
- 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])
|
528
|
+
- Fix `DescribeClass` to not flag `describe` at the top of a block of shared examples. ([@clupprich])
|
529
|
+
- Add `SingleArgumentMessageChain` cop for recommending use of `receive` instead of `receive_message_chain` where possible. ([@bquorning])
|
530
|
+
- Add `RepeatedDescription` cop for detecting repeated example descriptions within example groups. ([@backus])
|
508
531
|
|
509
532
|
## 1.8.0 (2016-10-27)
|
510
533
|
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
534
|
+
- Optionally ignore method names in the `describe` argument when running the `FilePath` cop. ([@bquorning])
|
535
|
+
- Fix regression in how `FilePath` converts alphanumeric class names into paths. ([@bquorning])
|
536
|
+
- Add `ImplicitExpect` cop for enforcing `should` vs. `is_expected.to`. ([@backus])
|
537
|
+
- Disable `MessageExpectation` cop in the default configuration. ([@bquorning])
|
515
538
|
|
516
539
|
## 1.7.0 (2016-08-24)
|
517
540
|
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
541
|
+
- Add support for checking all example groups with `ExampleLength`. ([@backus])
|
542
|
+
- Add support for checking shared example groups for `DescribedClass`. ([@backus])
|
543
|
+
- Add support for checking `its` from [rspec-its](https://github.com/rspec/rspec-its). ([@backus])
|
544
|
+
- Add `EmptyExampleGroup` cop for detecting `describe`s and `context`s without any tests inside. ([@backus])
|
545
|
+
- Add `CustomIncludeMethods` configuration option for `EmptyExampleGroup`. ([@backus])
|
546
|
+
- Add `NestedGroups` cop for detecting excessive example group nesting. ([@backus])
|
547
|
+
- Add `MaxNesting` configuration option for `NestedGroups` cop. ([@backus])
|
548
|
+
- Add `ExpectActual` cop for detecting literal values within `expect(...)`. ([@backus])
|
549
|
+
- Add `MultipleExpectations` cop for detecting multiple `expect(...)` calls within one example. ([@backus])
|
550
|
+
- Add `Max` configuration option for `MultipleExpectations`. ([@backus])
|
551
|
+
- Add `SubjectStub` cop for testing stubbed test subjects. ([@backus])
|
552
|
+
- Add `LetSetup` cop for detecting cases where `let!` is used for test setup. ([@backus])
|
553
|
+
- Change all cops to only inspect files with names following rspec convention (`*/spec/*` and/or `_spec.rb`). ([@backus])
|
554
|
+
- Add `AllCops/RSpec` configuration option for specifying custom spec file patterns. ([@backus])
|
555
|
+
- Add `AssignmentOnly` configuration option for `RSpec/InstanceVariable` cop. ([@backus])
|
556
|
+
- Add `BeEql` cop which looks for expectations that can use `be(...)` instead of `eql(...)`. ([@backus])
|
557
|
+
- Add autocorrect support for `BeEql` cop. ([@backus])
|
558
|
+
- Add `MessageExpectation` cop for enforcing consistent style of either `expect(...).to receive` or `allow(...).to receive`. ([@backus])
|
559
|
+
- Add `MessageChain` cop. ([@bquorning])
|
537
560
|
|
538
561
|
## 1.6.0 (2016-08-03)
|
539
562
|
|
540
|
-
|
563
|
+
- Add `SkipBlocks` option for `DescribedClass` cop. ([@backus])
|
541
564
|
|
542
565
|
## 1.5.3 (2016-08-02)
|
543
566
|
|
544
|
-
|
567
|
+
- Add `RSpec/NamedSubject` cop. ([@backus])
|
545
568
|
|
546
569
|
## 1.5.2 (2016-08-01)
|
547
570
|
|
548
|
-
|
549
|
-
|
571
|
+
- Drop support for ruby `2.0.0` and `2.1.0`. ([@backus])
|
572
|
+
- Internal refactorings and improved test coverage. ([@backus])
|
550
573
|
|
551
574
|
## 1.5.1 (2016-07-20)
|
552
575
|
|
553
|
-
|
554
|
-
|
576
|
+
- Fix `unrecognized parameter RSpec/VerifiedDoubles:IgnoreSymbolicNames` warning. ([@jeffreyc])
|
577
|
+
- Update to rubocop 0.41.2. ([@backus])
|
555
578
|
|
556
579
|
## 1.5.0 (2016-05-17)
|
557
580
|
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
581
|
+
- Expand `VerifiedDoubles` cop to check for `spy` as well as `double`. ([@andyw8])
|
582
|
+
- Enable `VerifiedDoubles` cop by default. ([@andyw8])
|
583
|
+
- Add `IgnoreSymbolicNames` option for `VerifiedDoubles` cop. ([@andyw8])
|
584
|
+
- Add `RSpec::ExampleLength` cop. ([@andyw8])
|
585
|
+
- Handle alphanumeric class names in `FilePath` cop. ([@andyw8])
|
586
|
+
- Skip `DescribeClass` cop for view specs. ([@andyw8])
|
587
|
+
- Skip `FilePath` cop for Rails routing specs. ([@andyw8])
|
588
|
+
- Add cop to check for focused specs. ([@renanborgescampos], [@jaredmoody])
|
589
|
+
- Clean-up `RSpec::NotToNot` to use same configuration semantics as other Rubocop cops, add autocorrect support for `RSpec::NotToNot`. ([@baberthal])
|
590
|
+
- Update to rubocop 0.40.0. ([@nijikon])
|
568
591
|
|
569
592
|
## 1.4.1 (2016-04-03)
|
570
593
|
|
571
|
-
|
572
|
-
|
573
|
-
|
594
|
+
- Ignore routing specs for DescribeClass cop. ([@nijikon])
|
595
|
+
- Move rubocop dependency to runtime. ([@nijikon])
|
596
|
+
- Update to rubocop 0.39.0. ([@nijikon])
|
574
597
|
|
575
598
|
## 1.4.0 (2016-02-15)
|
576
599
|
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
600
|
+
- Update to rubocop 0.37.2. ([@nijikon])
|
601
|
+
- Update ruby versions we test against. ([@nijikon])
|
602
|
+
- Add `RSpec::NotToNot` cop. ([@miguelfteixeira])
|
603
|
+
- Add `RSpec/AnyInstance` cop. ([@mlarraz])
|
581
604
|
|
582
605
|
## 1.3.1
|
583
606
|
|
584
|
-
|
585
|
-
|
607
|
+
- Fix auto correction issue - syntax had changed in RuboCop v0.31. ([@bquorning])
|
608
|
+
- Add RuboCop clone to vendor folder - see #39 for details. ([@bquorning])
|
586
609
|
|
587
610
|
## 1.3.0
|
588
611
|
|
589
|
-
|
590
|
-
|
591
|
-
|
612
|
+
- Ignore non string arguments for FilePathCop - thanks to @deivid-rodriguez. ([@geniou])
|
613
|
+
- Skip DescribeMethod cop for tagged specs. ([@deivid-rodriguez])
|
614
|
+
- Skip DescribeClass cop for feature/request specs. ([@deivid-rodriguez])
|
592
615
|
|
593
616
|
## 1.2.2
|
594
617
|
|
595
|
-
|
618
|
+
- Make `RSpec::ExampleWording` case insensitive. ([@geniou])
|
596
619
|
|
597
620
|
## 1.2.1
|
598
621
|
|
599
|
-
|
622
|
+
- Add `RSpec::VerifiedDoubles` cop. ([@andyw8])
|
600
623
|
|
601
624
|
## 1.2.0
|
602
625
|
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
626
|
+
- Drop support of ruby `1.9.2`. ([@geniou])
|
627
|
+
- Update to RuboCop `~> 0.24`. ([@geniou])
|
628
|
+
- Add `autocorrect` to `RSpec::ExampleWording`. This experimental - use with care and check the changes. ([@geniou])
|
629
|
+
- Fix config loader debug output. ([@geniou])
|
630
|
+
- Rename `FileName` cop to `FilePath` as a workaround - see [#19](https://github.com/nevir/rubocop-rspec/issues/19). ([@geniou])
|
608
631
|
|
609
632
|
## 1.1.0
|
610
633
|
|
611
|
-
|
634
|
+
- Add `autocorrect` to `RSpec::DescribedClass` cop. ([@geniou])
|
612
635
|
|
613
636
|
## 1.0.1
|
614
637
|
|
615
|
-
|
638
|
+
- Add `config` folder to gemspec. ([@pstengel])
|
616
639
|
|
617
640
|
## 1.0.rc3
|
618
641
|
|
619
|
-
|
620
|
-
|
642
|
+
- Update to RuboCop `>= 0.23`. ([@geniou])
|
643
|
+
- Add configuration option for `CustomTransformation` to `FileName` cop. ([@geniou])
|
621
644
|
|
622
645
|
## 1.0.rc2
|
623
646
|
|
624
|
-
|
625
|
-
|
647
|
+
- Gem is no longer 20MB (sorry!). ([@nevir])
|
648
|
+
- `RspecFileName` cop allows for method specs to organized into directories by class and type. ([@nevir])
|
626
649
|
|
627
650
|
## 1.0.rc1
|
628
651
|
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
652
|
+
- Update code to work with rubocop `>= 0.19`. ([@geniou])
|
653
|
+
- Split `UnitSpecNaming` cop into `RSpecDescribeClass`, `RSpecDescribeMethod` and `RSpecFileName` and enabled them all by default. ([@geniou])
|
654
|
+
- Add `RSpecExampleWording` cop to prevent to use of should at the beginning of the spec description. ([@geniou])
|
655
|
+
- Fix `RSpecFileName` cop for non-class specs. ([@geniou])
|
656
|
+
- Adapt `RSpecFileName` cop to common naming convention and skip spec with multiple top level describes. ([@geniou])
|
657
|
+
- Add `RSpecMultipleDescribes` cop to check for multiple top level describes. ([@geniou])
|
658
|
+
- Add `RSpecDescribedClass` to promote the use of `described_class`. ([@geniou])
|
659
|
+
- Add `RSpecInstanceVariable` cop to check for the usage of instance variables. ([@geniou])
|
637
660
|
|
638
661
|
<!-- Contributors (alphabetically) -->
|
639
662
|
|
640
663
|
[@abrom]: https://github.com/abrom
|
641
664
|
[@ahukkanen]: https://github.com/ahukkanen
|
642
665
|
[@akiomik]: https://github.com/akiomik
|
643
|
-
[@
|
666
|
+
[@akrox58]: https://github.com/akrox58
|
667
|
+
[@alexwayfer]: https://github.com/AlexWayfer
|
644
668
|
[@andrykonchin]: https://github.com/andrykonchin
|
645
669
|
[@andyw8]: https://github.com/andyw8
|
646
670
|
[@anthony-robin]: https://github.com/anthony-robin
|
@@ -650,33 +674,34 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
|
|
650
674
|
[@biinari]: https://github.com/biinari
|
651
675
|
[@bmorrall]: https://github.com/bmorrall
|
652
676
|
[@bquorning]: https://github.com/bquorning
|
653
|
-
[@
|
654
|
-
[@
|
677
|
+
[@brentwheeldon]: https://github.com/BrentWheeldon
|
678
|
+
[@brianhawley]: https://github.com/BrianHawley
|
655
679
|
[@cfabianski]: https://github.com/cfabianski
|
656
680
|
[@clupprich]: https://github.com/clupprich
|
657
681
|
[@composerinteralia]: https://github.com/composerinteralia
|
658
|
-
[@
|
682
|
+
[@darhazer]: https://github.com/Darhazer
|
659
683
|
[@daveworth]: https://github.com/daveworth
|
660
684
|
[@dduugg]: https://github.com/dduugg
|
661
685
|
[@deivid-rodriguez]: https://github.com/deivid-rodriguez
|
662
686
|
[@dgollahon]: https://github.com/dgollahon
|
663
|
-
[@
|
687
|
+
[@drowze]: https://github.com/Drowze
|
664
688
|
[@dswij]: https://github.com/dswij
|
665
689
|
[@dvandersluis]: https://github.com/dvandersluis
|
666
690
|
[@edgibbs]: https://github.com/edgibbs
|
667
691
|
[@eikes]: https://github.com/eikes
|
668
692
|
[@eitoball]: https://github.com/eitoball
|
669
693
|
[@elebow]: https://github.com/elebow
|
670
|
-
[@
|
694
|
+
[@elisefitz15]: https://github.com/EliseFitz15
|
671
695
|
[@elliterate]: https://github.com/elliterate
|
672
696
|
[@foton]: https://github.com/foton
|
673
697
|
[@francois-ferrandis]: https://github.com/francois-ferrandis
|
674
|
-
[@
|
698
|
+
[@g-rath]: https://github.com/G-Rath
|
675
699
|
[@geniou]: https://github.com/geniou
|
676
700
|
[@gsamokovarov]: https://github.com/gsamokovarov
|
677
701
|
[@harry-graham]: https://github.com/harry-graham
|
678
702
|
[@harrylewis]: https://github.com/harrylewis
|
679
703
|
[@hosamaly]: https://github.com/hosamaly
|
704
|
+
[@ignaciovillaverde]: https://github.com/ignaciovillaverde
|
680
705
|
[@jaredbeck]: https://github.com/jaredbeck
|
681
706
|
[@jaredmoody]: https://github.com/jaredmoody
|
682
707
|
[@jeffreyc]: https://github.com/jeffreyc
|
@@ -689,15 +714,16 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
|
|
689
714
|
[@koic]: https://github.com/koic
|
690
715
|
[@lazycoder9]: https://github.com/lazycoder9
|
691
716
|
[@leoarnold]: https://github.com/leoarnold
|
717
|
+
[@liberatys]: https://github.com/Liberatys
|
692
718
|
[@lokhi]: https://github.com/lokhi
|
693
719
|
[@luke-hill]: https://github.com/luke-hill
|
694
|
-
[@
|
720
|
+
[@m-yamashita01]: https://github.com/M-Yamashita01
|
695
721
|
[@miguelfteixeira]: https://github.com/miguelfteixeira
|
696
722
|
[@mkenyon]: https://github.com/mkenyon
|
697
723
|
[@mkrawc]: https://github.com/mkrawc
|
698
724
|
[@mlarraz]: https://github.com/mlarraz
|
699
725
|
[@mockdeep]: https://github.com/mockdeep
|
700
|
-
[@
|
726
|
+
[@mothonmars]: https://github.com/MothOnMars
|
701
727
|
[@nc-holodakg]: https://github.com/nc-holodakg
|
702
728
|
[@nevir]: https://github.com/nevir
|
703
729
|
[@ngouy]: https://github.com/ngouy
|
@@ -708,20 +734,20 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
|
|
708
734
|
[@oshiro3]: https://github.com/oshiro3
|
709
735
|
[@patrickomatic]: https://github.com/patrickomatic
|
710
736
|
[@paydaylight]: https://github.com/paydaylight
|
711
|
-
[@
|
737
|
+
[@philcoggins]: https://github.com/PhilCoggins
|
712
738
|
[@pirj]: https://github.com/pirj
|
713
739
|
[@pocke]: https://github.com/pocke
|
714
740
|
[@pstengel]: https://github.com/pstengel
|
715
|
-
[@
|
741
|
+
[@qqism]: https://github.com/QQism
|
716
742
|
[@r7kamura]: https://github.com/r7kamura
|
717
|
-
[@
|
743
|
+
[@rafix02]: https://github.com/Rafix02
|
718
744
|
[@redross]: https://github.com/redross
|
719
745
|
[@renanborgescampos]: https://github.com/renanborgescampos
|
720
746
|
[@robotdana]: https://github.com/robotdana
|
721
747
|
[@rolfschmidt]: https://github.com/rolfschmidt
|
722
748
|
[@rrosenblum]: https://github.com/rrosenblum
|
723
749
|
[@rspeicher]: https://github.com/rspeicher
|
724
|
-
[@
|
750
|
+
[@rst-j]: https://github.com/RST-J
|
725
751
|
[@schmijos]: https://github.com/schmijos
|
726
752
|
[@seanpdoyle]: https://github.com/seanpdoyle
|
727
753
|
[@sl4vr]: https://github.com/sl4vr
|
@@ -730,7 +756,7 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
|
|
730
756
|
[@tdeo]: https://github.com/tdeo
|
731
757
|
[@tejasbubane]: https://github.com/tejasbubane
|
732
758
|
[@telmofcosta]: https://github.com/telmofcosta
|
733
|
-
[@
|
759
|
+
[@tietew]: https://github.com/Tietew
|
734
760
|
[@timrogers]: https://github.com/timrogers
|
735
761
|
[@topalovic]: https://github.com/topalovic
|
736
762
|
[@twalpole]: https://github.com/twalpole
|