File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 5
5
- Mark ` RSpec/IncludeExamples ` as ` SafeAutoCorrect: false ` . ([ @yujideveloper ] )
6
6
- Fix a false positive for ` RSpec/LeakyConstantDeclaration ` when defining constants in explicit namespaces. ([ @naveg ] )
7
7
- Add support for error matchers (` raise_exception ` and ` raise_error ` ) to ` RSpec/Dialect ` . ([ @lovro-bikic ] )
8
+ - Don't register offenses for ` RSpec/DescribedClass ` within ` Data.define ` blocks. ([ @lovro-bikic ] )
8
9
9
10
## 3.6.0 (2025-04-18)
10
11
Original file line number Diff line number Diff line change @@ -83,7 +83,13 @@ class DescribedClass < Base # rubocop:disable Metrics/ClassLength
83
83
84
84
# @!method common_instance_exec_closure?(node)
85
85
def_node_matcher :common_instance_exec_closure? , <<~PATTERN
86
- (block (send (const nil? {:Class :Module :Struct}) :new ...) ...)
86
+ (block
87
+ {
88
+ (send (const nil? {:Class :Module :Struct}) :new ...)
89
+ (send (const nil? :Data) :define ...)
90
+ }
91
+ ...
92
+ )
87
93
PATTERN
88
94
89
95
# @!method rspec_block?(node)
Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ module Foo
178
178
Class.new { foo = MyClass }
179
179
Module.new { bar = MyClass }
180
180
Struct.new { lol = MyClass }
181
+ Data.define { dat = MyClass }
181
182
182
183
def method
183
184
include MyClass
You can’t perform that action at this time.
0 commit comments