Wraps jasmine-junitreporter in a gem, suitable for use with jasmine-rails.
Add this line to your application's Gemfile:
gem 'jasmine-junitreporter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jasmine-junitreporter
Add this to your jasmine.yml
:
reporters:
junit:
- "JUnitReporter.js"
- "JUnitReporter.boot.js"
JUnitReporter.js
is provided by this gem. JUnitReporter.boot.js
is
the glue code you need to provide to configure and enable the
reporter. Create the file with content like:
(function() {
var reporter = new jasmine.JUnitReporter({
outputDir: 'output/dir'
});
jasmine.getEnv().addReporter(reporter);
})();
Alternatively, you can create JUnitReporter.boot.js.erb
, allowing
for configuration via any Ruby code, including environment variables.
You can then run the tests as:
$ RAILS_ENV=test REPORTERS='console,junit' rake spec:javascripts
- Fork it ( http://github.com/shepmaster/jasmine-junitreporter-gem/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request