[Rspec-devel] New proc.should_increment method

David Chelimsky dchelimsky at gmail.com
Fri Jul 14 22:05:29 EDT 2006

On 7/14/06, Lachie <lachiec at gmail.com> wrote:
> Thanks :)
> > -Which is not BDD, but still useful in Rails while waiting for better
> > mock support in rails.
> In the rails-and-pure-BDD context, do you guys see mocking replacing
> AR connecting to a DB in model specs?

I was talking to Steve about this today. He's working on an a
memory_connection_adapter that you could use instead of a DB as long
as you don't write any in-line sql.

My thinking is that it's ok to use the DB for AR-backed models and
high level acceptance tests (integration tests), but that's all.

> This is somewhere I'd always want to write state-bases specs, pure BDD
> notwithstanding, because of AR's thorough integration with my tables.

It's not just integration w/ the tables - it's complete reliance on
the tables for the data structure. In my view, they are PART of the
models and should be included when you're testing the models. I just
don't think  you need them when you're testing everything else.

More information about the Rspec-devel mailing list