Adds several generally helpful assertions to minitest and minitest-spec that you might be used to having, especially if you're coming from rspec:
[1, 2, 3].must_equal_contents [3, 2, 1]
{:a => 1, :b => 2}.must_equal_hash {:b => 2, :a => 1}
[1, 2, 3].must_include_all [1, 2]
something.works?.should_be_true
These may make it into minitest proper, someday.
Add this line to your application's Gemfile (in your "test" gem group, if you have one):
gem 'minitest-great_expectations'
Add this to your minitest_helper.rb
:
require 'minitest/great_expectations'
And then execute:
$ bundle
- Fork it
- 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
- Explicitly added MIT licensing to the gemspec.
- Added
assert_equal_hash
/must_equal_hash
- Reordered error messages to be more consistent with must_equal/assert_equal
- Added
assert_includes_none
/wont_include_any
- Added proper require, and moved into correct subdirectories
- First whack