Bambinos RSS

New Bamboo

Bamboo Blog

Archive

Aug
21st
Thu
permalink wildfalcon

should_receive in rspec stories

In Test 1 I do this

SSO::SSO.should_receive(:authorize).with(“foo@bar.com”, “pass”).and_return(“asdf”)

So now:

SSO::SSO.authorize(“foo@bar.com”, “pass”) -> “asdf”

Then in test 2 I do

SSO::SSO.should_receive(:authorize).with(“foo@bar.com”, “pass”).and_return(“qwer”)

But I still get…..

SSO::SSO.authorize(“foo@bar.com”, “pass”) -> “asdf”

:(