[rspec-users] Spec/Test Speed
Ben Mabey
ben at benmabey.com
Sun Oct 7 15:01:26 EDT 2007
>
> The factory method (or attribute_helper) still hits the database. I
> don't see it as any sort of performance gain. In fact, I've even
> developed a plugin around the Factory idea, and it was only when I
> started using it in all of my tests that the speed really started to
> affect me (I was using mocking/stubbing, with much frustration prior
> to that point). But to me it's pretty clear the plugin (or the
> factory) is not the problem - the hit is the database. DHH saw this
> hit, and since they were using fixtures,he found that creating the
> fixtures, and then wrapping each test in a transaction was a huge
> performance gain. I wonder if the same would be true with setups/
> before(:each)...
>
>
Scott,
Where is this factory plugin you speak of?
Thanks,
Ben
More information about the rspec-users
mailing list