With the many testing framework that is available in the Ruby community namely: unittest, rspec, shoulda, and coulda, what would be the most appropriate testing framework to test my Rails model?
Do they basically have the same functionality, which is to unittest my model? When should I use which? What is the advantage of using one and not the other? Please help me decide.
Thank you very much for your insights.
I too would suggest starting with Test::Unit just to get a feel for it. Then take a look a look at some of the other frameworks and see what you like best. Shoulda is probably one of the easier ones to get started with coming from plain Test::Unit so it might be an ideal place to look next. On the other hand if you really like the syntax of RSpec you should definitely go with that.
Wars get waged over this topic, but the thing is it doesn’t really matter what you use, as long as your doing some form of testing. Also there is nothing wrong with just sticking with Test::Unit if that suits you 🙂
Personally I’m a fan of the Shoulda + Factory Girl combo.