Open
Description
Motivation
Would be nice to be able to pipe expectation calls, passing the bypass instance to next expectation.
bypass
|> Bypass.expect("POST", "/auth", fn conn ->
# response ...
end)
|> Bypass.expect("POST", "/resource", fn conn ->
# assert authenticated
# response
end)
Similar to what mox does:
MyMock
|> expect(:add, fn x, y -> x + y end)
|> expect(:add, fn x, y -> x * y end)
Proposed solution
Return the bypass instance back in all expectation functions.