Wednesday, December 19, 2007

Rails Default Testing Leaks Memory

I feel that the approach Test::Unit uses is dangerous. At some point, this probably needs to be fixed for real.

Ola Bini shows how Test::Unit tests can spiral out of control and adds some code to keep them in rein.

Inspired by that, here's a self-profiling spec runner. It's just a slapdash blend of the RSpec spec command and some basic code from the ruby-prof RDocs. Save it as profiling_spec.

This gives you some extremely extensive detail. It's probably overkill. Aslak Helles√ły's simple build profiler might actually be more effective.