aboutsummaryrefslogtreecommitdiffstats
path: root/lib/minitest/benchmark.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/minitest/benchmark.rb')
-rw-r--r--lib/minitest/benchmark.rb14
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