I think all is there to make it happen, you just need to track object changes -which AR does with #changed? and such.

Would love to see it happen, though I'm afraid I don't have time atm to help.

--
Pat

On 16/03/2010, at 6:48 PM, Ben Hoskings <[email protected]> wrote:

On 16/03/2010, at 5:54 PM, Xavier Shay wrote:

In which I wave my hands a lot. I haven't thought this through totally, but thought I'd throw it out there.

Problem:
- My specs are slow oh no!
- Setting up objects/object trees takes heaps of time
- There's a *lot* of duplication in object creation in most test suites

I was thinking about this exact problem just this afternoon. I've been writing a few specs for a project that has these same speed issues. Single specs taking 2-3 seconds to run :)


Solution:
- Add 'smarts' to machinist* so that it auto-generates fixtures for common objects and keeps them in the DB

I like this idea. I think it's doable.

A pool of fixture records, which specs can "check out" for use. If the pool dries up, machinist lazily creates more.

Time for a hack night? :)

—ben_h

--
You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en .


--
You received this message because you are subscribed to the Google Groups "Ruby or 
Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to