Rspec vs. TestUnit

前端 未结 6 1526
盖世英雄少女心
盖世英雄少女心 2020-12-23 20:14

I\'m beginning the planning phase of creating a testing suite for my rails 3.0.8 application. I\'m trying to decide on which testing framework/gems to use. Normally I prefer

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 20:28

    The answer is matter of taste, use both in one project and find yourself what do you prefer. (I do Test::Unit, RSpec has to much sugar for me).

    Update 2014: As Ruby 2.x has MiniTest built-in I would suggest to check MiniTest::Spec eventually which is simple BDD extension. You can mix "describe" and "it" blocks to nicely structure test contexts with. It also provides "must_be.." matchers if you want to more than assert.

提交回复
热议问题