I can test if arguments are passed like:
RSpec.describe do
it do
obj = double
expect(obj).to receive(:method).with(1, 2, 3)
obj.method(1, 2, 3)
end
end
How should I do about a block parameter? My ideal code:
RSpec.describe do
it do
obj = double
proc = Proc.new{}
expect(obj).to receive(:method).with(1, 2, 3).with_block(proc)
obj.method(1, 2, 3, &proc)
end
end