In the steps below, we'll start with a Ruby project that has an existing RSpec test suite, and we'll add JUnit XML as an additional output format for the test suite. In each step, we'll show the Git diff for the change that we're making.
rspec_junit_formatter as a dependency.
bundle add rspec_junit_formatter
Verify that your Gemfile file includes the new dependency:
@@ -3,3 +3,4 @@ source 'https://rubygems.org'
2. Update your
.rspec configuration file to output JUnit XML reports at
@@ -1,2 +1,4 @@
3. Update your
.gitignore file so that the JUnit report doesn't accidentally get checked into the repository.
@@ -1 +1,2 @@
4. Commit these changes to your repository.
git commit -am "Generate test reports with rspec_junit_formatter"