ruby-on-railsrubytestingdevelopment-processtdd

What is a good way to do a light unit-testing in an Rails web application?


I am on a tight timeline with minimum resources for a project.

I would like to practice test driven development for this project, but realistically, i would not have time to learn any of the more sophisticated frameworks like Cucumber, Rspec, etc. And it would probably be counter-productive at this point anyway

What do you recommend is the minimum I do?


Solution

  • If you are very short on time, your best bet would be to read through the rails guide on testing. It equips you to get started quickly with Test:Unit.

    Then you could write unit tests for the (model) methods that you care most about - things most critical to your app.

    Optional suggestion - Rails testing is a landscape full of controversies and debates. If you want to save time, get started with (any) one thing (Test:Unit/shoulda/rspec...fixture/factory ..etc) and leave the discussions for leisure.