diff --git a/lib/rubocop/cop/rspec/void_expect.rb b/lib/rubocop/cop/rspec/void_expect.rb index ae0f87a2b..5b315fd00 100644 --- a/lib/rubocop/cop/rspec/void_expect.rb +++ b/lib/rubocop/cop/rspec/void_expect.rb @@ -52,7 +52,7 @@ def void?(expect) return true unless parent return true if parent.begin_type? - true if parent.block_type? && parent.body == expect + parent.block_type? && parent.body == expect end end end