No release in over 3 years
minitest-global_expectations allows you to keep using simple code in your minitest specs, without having to wrap every single object you are calling an expectation method on with an underscore.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

minitest-global_expectations¶ ↑

minitest-global_expectations allows you to keep using simple code in your minitest specs, without having to wrap every single object you are calling an expectation method on with _:

# You can use:
foo.must_equal 1

# instead of:
_(foo).must_equal 1

Calling expectation methods on all objects was supported in Minitest <5.12, was deprecated in Minitest 5.12, and is planned to be removed from Minitest 6.

Installation¶ ↑

gem install minitest-global_expectations

Source Code¶ ↑

Source code is available on GitHub at github.com/jeremyevans/minitest-global_expectations

Usage ¶ ↑

Just require the library. You can switch requires of minitest/spec to:

require 'minitest/global_expectations'

Alternatively, if you are requiring minitest/autorun, you can switch to:

require 'minitest/global_expectations/autorun'

License¶ ↑

MIT

Author¶ ↑

Jeremy Evans <code@jeremyevans.net>