Skip to content

Commit bd473a7

Browse files
committed
Minor documentation fix in LeakyConstantDeclaration cop
1 parent bcb7ce2 commit bd473a7

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

lib/rubocop/cop/rspec/leaky_constant_declaration.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ module RSpec
4747
# end
4848
#
4949
# # good - anonymous class, no constant needs to be defined
50-
# let(:foo_class) do
51-
# Class.new(described_class) do
52-
# def double_that
53-
# some_base_method * 2
50+
# describe SomeClass do
51+
# let(:foo_class) do
52+
# Class.new(described_class) do
53+
# def double_that
54+
# some_base_method * 2
55+
# end
5456
# end
5557
# end
5658
#

manual/cops_rspec.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,10 +1530,12 @@ describe SomeClass do
15301530
end
15311531

15321532
# good - anonymous class, no constant needs to be defined
1533-
let(:foo_class) do
1534-
Class.new(described_class) do
1535-
def double_that
1536-
some_base_method * 2
1533+
describe SomeClass do
1534+
let(:foo_class) do
1535+
Class.new(described_class) do
1536+
def double_that
1537+
some_base_method * 2
1538+
end
15371539
end
15381540
end
15391541

0 commit comments

Comments
 (0)