Daniel Salmeron Amselem wrote:
How would you test this method? Checking the database or mocking? Is
there any advantage of using one over the other ?
Hi, Dani.
You originally wrote that you want "to check if my account object is
being destroyed." I can think of a few reasons to check this:
1
Hey Pat, thanks for replying.
How would you test this method? Checking the database or mocking? Is
there any advantage of using one over the other ?
I don't really understand the benefits of using mocks, so could you
tell me how would you write the test using both methods (mocking, and
checking t
On May 14, 2010, at 8:09 AM, Daniel Salmeron Amselem wrote:
> Hi,
>
> I have a problem when testing the deletion of a record from the
> database. I am using RSpec methods to check if my account object is
> being destroyed.
>
> The factory creates an account object and saves it into the DB. Also
Hi,
I have a problem when testing the deletion of a record from the
database. I am using RSpec methods to check if my account object is
being destroyed.
The factory creates an account object and saves it into the DB. Also
the two should_receive expectations seem to work.
The problem is that when