minitest-bonus-assertions

code

github.com/halostatue/minitest-bonus-assertions

bugs

github.com/halostatue/minitest-bonus-assertions/issues

continuous integration

<img src=“https://travis-ci.org/halostatue/minitest-bonus-assertions.png” />

Description

Additional assertions for Minitest.

Features

New assertions:

assert_false, must_be_false
assert_true, must_Be_true
assert_between, must_be_between
assert_has_keys, must_have_keys
assert_missing_keys, must_not_have_keys
assert_raises_with_message, must_raise_with_message

Background

minitest-bonus-assertions started life as a patch to the assertions provided by Ben Somer’s minitest-extra-assertions. There were some nice assertions included, but there were other changes that needed to be made to bring it up to support Minitest 5. There was also an override to the default assert_match implementation meant to ease the transition from Test::Unit (the main reason he wrote this assertion plugin for Minitest in the first place). I do not believe this is sensible five major versions in: I removed it.

Because Ben did not feel comfortable making this particular change, I felt that the best way to provide the original assertions and my new assertions—without the assert_match override—was to fork this as a new project. I am indebted to Ben for writing these assertions in the first place.

Install

Add it to your Gemfile:

gem 'minitest-bonus-assertions', '~> 1.0'

Or manually install:

% gem install minitest-bonus-assertions

minitest-bonus-assertions Semantic Versioning

minitest-bonus-assertions uses a Semantic Versioning scheme with one change:

  • When PATCH is zero (0), it will be omitted from version references.

:include: Contributing.rdoc

:include: Licence.rdoc