bmabey/database_cleaner — pull request #221 by tommeier (2013-06-12 22:38:59+00:00)
Title: [WIP] Refactor truncation to handle class eval only loaded adapters

Hi,
I've had an attempt at the first cut for running with proper decoration of adapters for truncation.

Though the more I got into it the more design decisions I noticed, and didn't quite understand.

Could you have a look at this? and let me know if you think its on the right track or if i've missed a critical design choice in the cull. The main change is applying on the underlying adapter rather than the superclass (if class_evaling on the superclass, you'd then need to forcibly reload the subclass, or so I can gather). In theory, this should work for the Arjdbc adapters too, but I don't have a running JRuby app to do extensie testing with. Best to get this working with the minimum as so, and work out the other edge cases again, unless you see them straight away.

Though, my moped tests still fail (connection error), but it appears others have that https://github.com/bmabey/database_cleaner/issues/215 and it probably just needs a 'testing' blurb added to the `README`. Are the features meant to pass? Or is `rake spec` the only focus right now?

### TODO
* [ ] Test on JRuby with ArJdbc adapters
* [ ] Test with issues on postgres/mysql combination exposed by @simi and @etagwerker