I’ve been working on a very large Rails projects at work and found myself spending a lot of time writing the same unit tests over and over again. The application has a very complex database schema and has 159 ActiveRecord models so far. With this many models, there are obviously a ton of associations. I decided that I needed a way to automatically test every association that is defined in a model.
The TestInjector plugin is the result. I still have a lot of functionality that I want to add, but it works very well and it’s ready for others to use.
I posted the details on the Rails wiki:
http://wiki.rubyonrails.org/rails/pages/TestInjector
Or just install it using the plugin manager and take a look at the README file for more details:
script/plugin install http://www.infused.org/svn/plugins/test_injector
or:
script/plugin discover
script/plugin install test_injector