Using unit_record and rspec (previously "Keeping unit tests from hitting the DB")

Back in August David C. wrote:

“FYI - I tried using the unit_record gem and there are some changes
required in rspec to make it work, but they are trivial and it works
great. The only trick is that the prevention of DB access is global
per process, so you’d have to separate examples that hit the DB from
those that don’t into two separate suites. I’ll explore this
possibility and follow up.”

I’ve taken a quick look through the latest RDocs and the rspec-devel
archives but cannot see (maybe through my own stupidity) anything
that suggests that trunk now supports unit_record out of the box, with
or without a configuration setting.

I would very much like to experiment with unit_record but would prefer
to do so with rspec rather then with test::unit. Not knowing the rspec
internals myself, please can we have an update on the status or see
the trivial patch that allows us to try this for ourselves.

Many thanks in advance.

Tim

On 10/20/07, Tim H. [email protected] wrote:

archives but cannot see (maybe through my own stupidity) anything
that suggests that trunk now supports unit_record out of the box, with
or without a configuration setting.

I would very much like to experiment with unit_record but would prefer
to do so with rspec rather then with test::unit. Not knowing the rspec
internals myself, please can we have an update on the status or see
the trivial patch that allows us to try this for ourselves.

This fell off the radar. I just added feature request:
http://rubyforge.org/tracker/index.php?group_id=797&atid=3152

Not the highest priority right now for me, but patches are welcome.

Cheers,
David