🕷 software projects

by ryan davis



proves success via assertion rather than absence of failure

Originally written by github user bradleyjames, minitest-proveit forces all tests to prove success (via at least one assertion) rather than rely on the absence of failure.

  • Activate and run your tests to ensure you have an assertion in each test.
  • Opt-in, for now
  • hooked via minitest/hell.
  • export MT_HELL=1 to enable globally.

    class MyTest < Minitest::Test prove_it!

    def test_good MyClass.do_the_thing assert MyClass.did_the_thing_correctly? end

    def test_bad MyClass.do_the_thing # => test failure end end

Get The Code

If you just want to use minitest-proveit, you can install it via RubyGems:
gem install minitest-proveit
Fork me on GitHub If you want to hack on minitest-proveit, clone it from GitHub:
git clone git://github.com/seattlerb/minitest-proveit

Latest Activity