I am trying to set expectations on a mocked ActiveRecord model. I created the following example, which should go based on the documentation I can find.
it "should pass given the correct expectations" do
payment = mock_model(Payment)
payment.should_receive(:membership_id).with(12)
payment.membership_id = 12
end
Error with error "... Mock" Payment_1004 "received an unexpected message: membership_id = with (12)"
I understand that I'm testing a mocking structure, I'm just trying to figure out how to set up expectations.
source
share