I summarized the procedure of the RSpec test in this article.
Since I summarized it as simple as possible, please read through those who are trying to create Rake task for the first time.
The following command creates a Rake task file in
(Please change “report”.)
Please write the following code in the above
After the coding, you can execute
rake report:generate command!
It’s so simple to execute unit testing.
In addition, if you type ReportGenerator.generate on rails console, you can also perform exactly the same processing as the Rake task.