开发者

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

Closed. This question is opinion-based. It is not currently accepting answers.
开发者_如何学C

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 5 years ago.

Improve this question

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?


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.


You might want to give Shoulda a try.


Test Unit is baked into rails and is pretty easy to use if you have any background with unit testing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜