sensu/sensu-community-plugins — pull request #263 by nstielau (2013-08-06 16:30:59+00:00)
Title: Check Testing Discussion

Checks are getting more complex, and multiple authors are editing the same checks. Testing can help clean up these workflows. Let's see if we can get a clean standard for testing checks.

Questions:

* Does it make sense to try to place the tests in the check (rather than in a test/spec directory)?
* Do we want to use minitest (instead of rspec)

I'm fine with minitest, I just used rspec because I thought of it first (sensu-plugin uses minitest, so we should probably standardize on that).

I like having the tests self-contained in the check, as long as it doesn't cause any runtime errors or performance degradation (which I think is easily achieved with a quick check of `$0`).

This would be integrated into the CI scripts as well.

This also depends on this sensu-plugin pull (https://github.com/sensu/sensu-plugin/pull/46), which allows the disabling of autorun behavior, so tests can load check classes without them running on process exit.

Thoughts?