DEV Community

Discussion on: Testing 1, 2, 3... RSpec Basics and Tips for RoR.

 
djuber profile image
Daniel Uber

I am personally comfortable with RSpec so I would reach for it by default in a personal project, however starting with either should be fine. The easy answer is "find the testing tutorial for your framework, and use it until you have a reason to change".

For rails that's probably the testing guide. The available assertions section probably gives you a "vocabulary" list to get started and suggest what you can test out of the box. The guide for rails is written for Minitest. RSpec's documentation also has details on how to integrate with rails projects (and there are going to be lots of examples available on github for both setups).

Usually, once you've got the first test running (it can find your code, it can load a class and call its methods) the rest is easy, and your problems may center more on making testable code (so the tests are easier to write) than configuring your test framework.

Thread Thread
 
sturpin profile image
Sergio Turpín

Thank you very much for your opinion, it's very helpful 😃