[mocha-developer] mocking methods called multiple times
jamesmead44 at gmail.com
Fri Mar 28 19:30:34 EDT 2008
On 28/03/2008, Ryan Sobol <ryan.sobol at tobi.com> wrote:
> i'm trying to use a test dummy to block the interaction between my
> test and our database.
> the code im testing makes a handful of active_record calls
> (create_table, add_index, etc.) i'm trying to use mocks to expect
> calls at the database adapter level (i'm thinking #execute, but no
> committed to it yet)
> long story short, i'm having difficulties telling mocha to expect 2
> calls to this method in the same test. thoughts?
Can you give us some more specifics? Ideally a simple test along with the
code that it exercises? Try and keep it as simple as possible while still
illustrating the point. It's always much easier to discuss concrete
More information about the mocha-developer