Displaying 1 result from an estimated 1 matches for "quote_num".
Did you mean:
quota_num
2008 Mar 05
7
mocking successive return values
I''m having a problems mocking successive return values. I don''t know
if I''m doing something wrong or if this is a limitation of rspec
mocks. Any ideas of what I may be doing wrong?
I''m trying to test the generate_quote_number method. It generates a
quote number, looks to see if it is in the db already. If it is, it
calls itself to try again. I want to test that it looks in the
database for matching numbers until it finds one which does not exist
already.
## The code
def generate_quote_number
quote_...