Open mspanc opened 9 years ago
Hi! You probably have to use parenthesis in your allow
declaration, otherwise |>
is trying to call to_receive
on the Supervisor
object directly, instead of the return of the allow
function:
describe ".start_link/0" do
before(:each) do
allow(Supervisor) |> to_receive(start_link: fn(options) -> {:ok, self()} end)
end
it "calls Supervisor.start_link" do
This.start_link
expect(Supervisor) |> to_have_received :start_link
end
end
Can you try if this works? Thanks!
Hello
I am trying to do the following
but I get the following error
** (FunctionClauseError) no function clause matching in Pavlov.Mocks.to_receive/2
I am using master.