minitest-bonus-assertions

code

github.com/halostatue/minitest-bonus-assertions

bugs

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

continuous integration

Description

Bonus assertions for Minitest, providing assertions I use frequently, supporting only Ruby 2.0 or better.

Features

New assertions:

I am also providing the Minitest-tester code I use as something that can be required by other developers. This should only be used to test Minitest assertions and extensions. For more information on Minitest::AssertionTests, see its documentation.

Background

minitest-bonus-assertions started life as a patch to 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 into Minitest: I removed it. Ben did not feel comfortable making this particular change, so 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 and his contributors for writing these assertions in the first place.

Install

Add it to your Gemfile:

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

Or manually install:

% gem install minitest-bonus-assertions

minitest-bonus-assertions Semantic Versioning

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

Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.

This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant, version 1.2.0, available at contributor-covenant.org/version/1/2/0/.

Contributing

I value any contribution to minitest-bonus-assertions you can provide: a bug report, a feature request, or code contributions.

As minitest-bonus-assertions is a mature codebase, there are a few guidelines:

Test Dependencies

minitest-bonus-assertions uses Ryan Davis’s Hoe to manage the release process, and it adds a number of rake tasks. You will mostly be interested in:

$ rake

which runs the tests the same way that:

$ rake test
$ rake travis

will do.

To assist with the installation of the development dependencies for minitest-bonus-assertions, I have provided the simplest possible Gemfile pointing to the (generated) minitest-bonus-assertions.gemspec file. This will permit you to do:

$ bundle install

to get the development dependencies. If you aleady have hoe installed, you can accomplish the same thing with:

$ rake newb

This task will install any missing dependencies, run the tests/specs, and generate the RDoc.

Workflow

Here's the most direct way to get your work merged into the project:

Contributors

Licence

This software is available under an MIT-style licence.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.