rspec-expectations
rspec-expectations copied to clipboard
Allow `satisfy` to match the block expectation return value
fixes https://github.com/rspec/rspec-expectations/issues/1466 idea https://github.com/rspec/rspec-expectations/issues/805#issuecomment-494380144
ary = [1, 2]
expect { ary.shift }
.to change { ary }.to([2])
.and satisfy { |returned_value| returned_value == 1 }