Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Rspec 和 Cucumber 学习 Ruby 开发。我很难知道什么时候必须从一个切换到另一个。我知道 Rspec 用于逻辑错误,而 Cucumber 用于结构/异常错误。
我怎么知道它给出了什么类型的错误?是否存在某种错误报告模式。
例如,expected ...是一个逻辑错误。
expected ...
Cucumber 通常用于验收测试,但在幕后您使用 Capybara 步骤进行浏览器自动化,当然 Rspec 也可以使用这些步骤。
所以这取决于你。您可以使用 Cucumber 进行验收测试,使用 Rspec 进行单元测试,或者使用 Rspec 进行所有测试。我个人选择后者,但这完全取决于你。尝试两者,看看它如何为你工作。