From f833ddacb84c4f76f474c4b9e93a507211b15d7a Mon Sep 17 00:00:00 2001 From: Phil Pirozhkov Date: Sat, 8 Aug 2020 18:42:29 +0300 Subject: [PATCH] fixup! Improve examples in documentation --- lib/rubocop/cop/rspec/multiple_memoized_helpers.rb | 4 ++-- manual/cops_rspec.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb b/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb index fb649053b..ea19b78ce 100644 --- a/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb +++ b/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb @@ -55,7 +55,7 @@ module RSpec # end # end # - # @example with AllowSubject configuration + # @example when disabling AllowSubject configuration # # # rubocop.yml # # RSpec/MultipleMemoizedHelpers: @@ -63,12 +63,12 @@ module RSpec # # # bad - `subject` counts towards memoized helpers # describe MyClass do + # subject { {} } # let(:foo) { [] } # let(:bar) { [] } # let!(:baz) { [] } # let(:qux) { [] } # let(:quux) { [] } - # subject { {} } # end # # @example with Max configuration diff --git a/manual/cops_rspec.md b/manual/cops_rspec.md index bc18cfc3d..4d2a14dc2 100644 --- a/manual/cops_rspec.md +++ b/manual/cops_rspec.md @@ -2179,7 +2179,7 @@ describe MyClass do end end ``` -#### with AllowSubject configuration +#### when disabling AllowSubject configuration ```ruby # rubocop.yml @@ -2188,12 +2188,12 @@ end # bad - `subject` counts towards memoized helpers describe MyClass do + subject { {} } let(:foo) { [] } let(:bar) { [] } let!(:baz) { [] } let(:qux) { [] } let(:quux) { [] } - subject { {} } end ``` #### with Max configuration