Skip to content

Instantly share code, notes, and snippets.

@Bijendra
Last active March 22, 2021 15:21
Show Gist options
  • Save Bijendra/0ef2ba970c8ade26f6a3a9db53c24fe0 to your computer and use it in GitHub Desktop.
Save Bijendra/0ef2ba970c8ade26f6a3a9db53c24fe0 to your computer and use it in GitHub Desktop.
Generating Rspec reports in Rails
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