Created
April 5, 2015 06:30
-
-
Save tenderlove/253f6eee35ec3578f0b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'minitest/autorun' | |
class FooTest < Minitest::Test | |
def self.profile name | |
define_method("test_profile_#{name}") do | |
# start timer | |
10.times { send name } | |
# end timer | |
if performace_regresses | |
flunk "you failed" | |
end | |
end | |
end | |
def test_thing | |
assert true | |
end | |
profile :test_thing | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@tenderlove, finally wrap up everything together: https://github.com/toch/minitest-perf_regression