You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RSpec.describe 10 do
it { is_expected.to satisfy { |v| v > 5 } }
end
rubocop test_spec.rb
Result is:
test_spec.rb:4:8: W: Lint/AmbiguousBlockAssociation: Parenthesize the param satisfy { |v| v > 5 } to make sure that the block will be associated with the satisfy method call.
it { is_expected.to satisfy { |v| v > 5 } }
Is there any way to use to satisfy matcher without disabling Lint/AmbiguousBlockAssociation?
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
I'm aware of #4222 issue, but it's pretty old, more complicated and maybe something changed since
Steps to reproduce the problem
rubocop test_spec.rb
Result is:
Is there any way to use
to satisfy
matcher without disablingLint/AmbiguousBlockAssociation
?RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:The text was updated successfully, but these errors were encountered: