Last active
March 22, 2021 15:21
-
-
Save Bijendra/0ef2ba970c8ade26f6a3a9db53c24fe0 to your computer and use it in GitHub Desktop.
Generating Rspec reports in Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails 5.1+ | |
Ruby 2.7 | |
In .rspec file in project folder(app1), addd the below lines | |
--colour | |
--format html | |
--out rspec_results.html | |
Rspec reports will be automatically saved in the above results file under root path. It can be run for the entire spec folder or for any custom path, can be viewed | |
http://localhost:63342/app1/rspec_results.html | |
command to execute: | |
rspec spec/apps/apis/section/controllers/* | |
To push the output in a specific file | |
rspec spec/apps/apis/section/controllers/* --format html --out report.html | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment