News for hackers. Stuff that matters.
Re:TTNT: Test This, Not That by hinkley on Friday October 02, 2015 @02:50PM (#10320467)
We used factory girl to alleviate some of this on the rails project I participated in. It helped but we still had a problem every time a new required field was added to the data model. In practice because of the issue of fixing all the existing tests, the cost of adding a new field went up logarithmically.

Honestly if you can't eliminate the persistence layer, I'd rather see DB vendors put more time and effort into making in memory tables work. The Java people (hibernate) swap out the store for an in-memory one to speed things up, but I'd rather see a Postgres instance with heavy write-back caching for testing.

Re:TTNT: Test This, Not That by MichaelGG on Friday October 02, 2015 @03:53PM (#10320885)
Put the data files on a RAM disk?
Re:TTNT: Test This, Not That by grandalf on Friday October 02, 2015 @05:50PM (#10321566)
In the code I've reviewed, it's not the speed of the db (mysql vs sqlite in-memory, for example), it's the overhead of ActiveRecord itself... tons of ruby object creation, GC, etc...
Re:TTNT: Test This, Not That by hinkley on Friday October 02, 2015 @09:20PM (#10322215)
I think we were down to about 80ms per test on that one.

I've since had projects with 9ms per test and it's hard to go back to thinking 80ms is 'good'.