Skip to content

Commit

Permalink
rename NoLet -> MemoizedHelpersInExampleGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
mockdeep committed Mar 20, 2020
1 parent 67e1242 commit 7407c51
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -15,7 +15,7 @@
* Add `RSpec/RepeatedExampleGroupDescription` cop. ([@lazycoder9][])
* Add block name and other lines to `RSpec/ScatteredSetup` message. ([@elebow][])
* Fix `RSpec/RepeatedDescription` to take into account example metadata. ([@lazycoder9][])
* Add `RSpec/NoLet` cop. ([@mockdeep][])
* Add `RSpec/MemoizedHelpersInExampleGroup` cop. ([@mockdeep][])

## 1.37.1 (2019-12-16)

Expand Down
4 changes: 2 additions & 2 deletions config/default.yml
Expand Up @@ -343,11 +343,11 @@ RSpec/NestedGroups:
Max: 3
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups

RSpec/NoLet:
RSpec/MemoizedHelpersInExampleGroup:
Description: Checks for usage of `let` blocks in specs.
Enabled: false
AllowSubject: false
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoLet
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MemoizedHelpersInExampleGroup

RSpec/NotToNot:
Description: Checks for consistent method usage for negating expectations.
Expand Down
Expand Up @@ -32,7 +32,7 @@ module RSpec
# @example with AllowSubject configuration
#
# # rubocop.yml
# # RSpec/NoLet:
# # RSpec/MemoizedHelpersInExampleGroup:
# # AllowSubject: true
#
# # bad
Expand All @@ -54,7 +54,7 @@ module RSpec
# end
# end
#
class NoLet < Cop
class MemoizedHelpersInExampleGroup < Cop
MSG = 'Avoid using `%<method>s` ' \
'– use a method call or local variable instead.'

Expand Down
2 changes: 1 addition & 1 deletion manual/cops.md
Expand Up @@ -65,7 +65,7 @@
* [RSpec/MultipleSubjects](cops_rspec.md#rspecmultiplesubjects)
* [RSpec/NamedSubject](cops_rspec.md#rspecnamedsubject)
* [RSpec/NestedGroups](cops_rspec.md#rspecnestedgroups)
* [RSpec/NoLet](cops_rspec.md#rspecnolet)
* [RSpec/MemoizedHelpersInExampleGroup](cops_rspec.md#rspecnolet)
* [RSpec/NotToNot](cops_rspec.md#rspecnottonot)
* [RSpec/OverwritingSetup](cops_rspec.md#rspecoverwritingsetup)
* [RSpec/Pending](cops_rspec.md#rspecpending)
Expand Down
6 changes: 3 additions & 3 deletions manual/cops_rspec.md
Expand Up @@ -2266,7 +2266,7 @@ Max | `3` | Integer

* [https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups](https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups)

## RSpec/NoLet
## RSpec/MemoizedHelpersInExampleGroup

Enabled by default | Supports autocorrection
--- | ---
Expand Down Expand Up @@ -2304,7 +2304,7 @@ end

```ruby
# rubocop.yml
# RSpec/NoLet:
# RSpec/MemoizedHelpersInExampleGroup:
# AllowSubject: true

# bad
Expand Down Expand Up @@ -2335,7 +2335,7 @@ AllowSubject | `false` | Boolean

### References

* [https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoLet](https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoLet)
* [https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MemoizedHelpersInExampleGroup](https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MemoizedHelpersInExampleGroup)

## RSpec/NotToNot

Expand Down
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::NoLet do
RSpec.describe RuboCop::Cop::RSpec::MemoizedHelpersInExampleGroup do
subject(:cop) { described_class.new(config) }

let(:config) { RuboCop::Config.new }
Expand Down

0 comments on commit 7407c51

Please sign in to comment.