[Rspec-devel] New proc.should_increment method

Ryan Platte ryan at platte.name
Sat Jul 15 02:28:58 EDT 2006

On 7/14/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> > 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.

Bless him. That's quite a challenge, I tried and quit. The adapter
layer really wants you to talk SQL with it. When Madeleine model
support was being considered, DHH strongly recommended it go in as a
separate thing rather than via an adapter.

Custom model objects are quite easy to hook up, even validations mix
right in with just, about, one method added. My thought is on my next
Rails app I'm going to wrap AR objects with my own models and spec
mine first, likely putting validations in mine instead of AR objects.
Just apply the shield pattern to AR as I would anything that made my
(b|t)dd life more difficult. Thoughts?

Ryan Platte

More information about the Rspec-devel mailing list