Rspec is an excellent testing framework for Ruby. It allows you to use a DSL to test your ruby code.
Generally, on a test, we will need some configuration that might have to run before or after the test.
This post continues our work in Improving our rake tasks with OOP.
In this one, we will discuss how to test our rake task; the example will be very straightforward. We will invoke the rake task and expect that some classes receive the correct arguments.