🕷 software projects

by ryan davis



keeps tests fast

minitest-speed adds test hooks to verify the time it takes to run the setup, body, and teardown phases of each test. If the time of any phase goes over the maximum time, it fails the test. Use class variables to set the maximum thresholds and crank it down over time.

  • Simple module inclusion to activate
  • Tweakable thresholds for each phase.

    class SpeedTest < Minitest::Test include Minitest::Speed

    @@max_setup_time = 0.01 @@max_test_time = 0.01 @@max_teardown_time = 0.01 end

    class MyTest « SpeedTest # … end

Get The Code

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

Latest Activity