This gem
provides a simple RSpec custom formatter that reports rspec
results in the Nagios/Icigna plugin output format.
rake is required for the install process. It can be installed running:
gem install rake
gem install rspec-nagios-formatter
bundle install
bundle exec rake install
The formatter may be used by either passing the -f|--format
flag to rspec
or with the included check_rspec
script. The later sets the appropriate exit status for a failing Nagios/Icinga plugin.
Usage: check_rspec [options] [--] [passed to rspec]
Specific options:
-t, --timeout TIMEOUT default: 30.0 (seconds)
-h, --help Show this message
Any options to check_rspec
not prefixed with -
or --
are passed directly
on to the rspec
utility. If you need to pass an option flag you may
terminated check_rspec
's option parsing with a bare --
.
check_rspec -- -e 'foo' trivial_spec.rb
rspec -f RSpec::Nagios::Formatter
See the documentation on rspec --format for more information.
Demonstration of running this gem's rspec
tests with it's own formatter
(after it's been installed).
$ bundle exec rspec
.......
Finished in 0.00268 seconds
7 examples, 0 failures
$ bundle exec rspec -f RSpec::Nagios::Formatter
RSPEC OK - 7 examples, 0 failures, finished in 0.00244 seconds | examples=7 passing=7 failures=0 pending=0 conformance=100% time=0.00244s
Please log tickets and issues at github