In this chapter, you will find information on how to test the rake tasks. It is important to understand that if you don't perform the tests, your rake tasks may fail just like a usual program. This is why the chapter starts by providing cases when the tasks fail, along with the reasons for their failure. Here, we will provide you with an example on how to test rake tasks using Ruby's embedded unit test framework—MiniTest.
In this chapter, we will cover the following topics:
The need for tests
Writing tests for rake tasks