[Backgroundrb-devel] backgroundrb and rspec Stories
voodoorai2000 at gmail.com
Thu Jan 3 17:38:52 EST 2008
Yes, mocking the database calls, sounds like the best option to
maintain the flow of the story.
I'm trying to mock it by using this:
Now, when I'm inside the worker I use the ruby debugger to see what's
happening, but I can still see only the fixtures, and the rspec
mocking call seems to lose it's context and not get used.
What would you suggest to mock the database call?
On Jan 3, 2008, at 11:01 PM, hemant wrote:
> On Jan 3, 2008 9:34 PM, Raimond Garcia <voodoorai2000 at gmail.com>
>> I would like to use backgroundrb inside a story, been trying to set
>> this up for a while, but I think the only solution is to use fixture
>> files and unit testing. The problem is that every time I call a new
>> worker, the test database gets wiped out, and only has available the
>> records in fixture files. Instead, it would be great if the test
>> database maintains its state throughout the rspec Story and so can
>> and update the records of previous steps.
> Or you can mock calls to database.
> Let them talk of their oriental summer climes of everlasting
> conservatories; give me the privilege of making my own summer with my
> own coals.
More information about the Backgroundrb-devel