diff options
author | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-04 21:46:01 +0000 |
---|---|---|
committer | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-04 21:46:01 +0000 |
commit | 6af843b9cb99fb844bf866e71e9ee52be126080f (patch) | |
tree | afee639e216cf32357c2d6e76de49f2549c6d5af /lib/minitest/benchmark.rb | |
parent | 95d4b3ba4974fdb9f08900267964949e30b1c821 (diff) | |
download | ruby-6af843b9cb99fb844bf866e71e9ee52be126080f.tar.gz |
Imported minitest 2.12.1 (r7323)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/minitest/benchmark.rb')
-rw-r--r-- | lib/minitest/benchmark.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/minitest/benchmark.rb b/lib/minitest/benchmark.rb index c6faa50770..02121db340 100644 --- a/lib/minitest/benchmark.rb +++ b/lib/minitest/benchmark.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 ###################################################################### # This file is imported from the minitest project. # DO NOT make modifications in this repo. They _will_ be reverted! @@ -7,9 +8,7 @@ require 'minitest/unit' require 'minitest/spec' -class MiniTest::Unit - attr_accessor :runner - +class MiniTest::Unit # :nodoc: def run_benchmarks # :nodoc: _run_anything :benchmark end @@ -318,6 +317,15 @@ class MiniTest::Spec define_method "bench_#{name.gsub(/\W+/, '_')}", &block end + ## + # Specifies the ranges used for benchmarking for that class. + # + # bench_range do + # bench_exp(2, 16, 2) + # end + # + # See Unit::TestCase.bench_range for more details. + def self.bench_range &block return super unless block |