Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecksJohannes committed Aug 13, 2023
1 parent 256ac40 commit 3c736f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/rspec/matchers/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,12 @@ def override_custom_matcher_method(klass, name)
end

def check_method_call_count
if (@call_count -= 1) > 0
RSpec.warning(
"The custom matcher `#{name}` or its negated method is called " \
return if (@call_count -= 1) == 0

RSpec.warning(
"The custom matcher `#{name}` or its negated method is called " \
'more than once in the test expectations without using `and` or `or`'
)
end
)
end

def actual_arg_for(block)
Expand Down

0 comments on commit 3c736f1

Please sign in to comment.