From the course: Ruby: Testing with RSpec
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Automatic testing - Ruby Tutorial
From the course: Ruby: Testing with RSpec
Automatic testing
- A lot of developers choose to set up Automatic Testing. After all, if running your test suite is good, than running them automatically and more often is even better. There are two main ways that we can do Automatic Testing. The first is using a tool like autotest. The way that autotest works is that you run it as a separate application in a new terminal or console window, and it watches your project directory. Then you go off and you start developing your code. Whenever you make a change and save a file, autotest notices and runs the specs that are related to that file. It happens automatically. You save a file, your tests run. You save another file, your tests run again. And you can set it up to notify you whenever one of those tests fails. At least at the moment, autotest ships with RSpec. To find out more about it, you can go to github.com/rspec/rspec-autotest. The documentation for it is in a slightly different location and that's the second URL that I've listed. Another choice…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.