Very new to Ruby and cucumber, and i've got a controller that accepts an ID. Basically a rest API, so the client would call /cows/1234 and /cows/777. That would then route to getFluffyCow and pass :id = 1234 or 777.
My initial attempt is as follows:
allow(getFluffyCow).to receive(:call).with(1234).and_return(mock_cow1)
allow(getFluffyCow).to receive(:call).with(777).and_return(mock_cow2)
but the response is returning nothing. What am I doing wrong?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire