Skip to content

Commit 10fb5a5

Browse files
committed
Use multiple terms union NP syntax
1 parent f1f369d commit 10fb5a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rubocop/cop/rspec/subject_stub.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ class SubjectStub < Base
4343
#
4444
# @yield [Symbol] subject name
4545
def_node_matcher :subject, <<-PATTERN
46-
{
47-
(block (send nil? :subject (sym $_)) args ...)
48-
(block (send nil? $:subject) args ...)
49-
}
46+
(block
47+
(send nil?
48+
{:subject (sym $_) | $:subject}
49+
) args ...)
5050
PATTERN
5151

5252
# @!method message_expectation?(node, method_name)

0 commit comments

Comments
 (0)