aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-15 16:26:51 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-15 16:26:51 -0700
commitf93a6d99e61f3766384d33cc8d1aaf212d8f4b0e (patch)
tree87235b0b6e73fdf9f93916678c45290975a73a9d /activesupport/lib/active_support/testing
parent09c70a0c03aa755a66dc94ebb2b98b283c7137c9 (diff)
downloadrails-f93a6d99e61f3766384d33cc8d1aaf212d8f4b0e.tar.gz
rails-f93a6d99e61f3766384d33cc8d1aaf212d8f4b0e.tar.bz2
rails-f93a6d99e61f3766384d33cc8d1aaf212d8f4b0e.zip
Delegate run_test to @harness
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index 24dc19167b..99dbb62092 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -83,7 +83,7 @@ module ActiveSupport
end
class Performer
- delegate :profile_options, :full_test_name, :to => :@harness
+ delegate :run_test, :profile_options, :full_test_name, :to => :@harness
def initialize(harness, metric)
@harness, @metric = harness, metric
@@ -97,7 +97,7 @@ module ActiveSupport
class Benchmarker < Performer
def run
- profile_options[:runs].times { @harness.run_test(@metric, :benchmark) }
+ profile_options[:runs].times { run_test(@metric, :benchmark) }
@total = @metric.total
end
@@ -132,7 +132,7 @@ module ActiveSupport
class Profiler < Performer
def run
- @runs.times { @harness.run_test(@metric, :profile) }
+ profile_options[:runs].times { run_test(@metric, :profile) }
@data = RubyProf.stop
@total = @data.threads.values.sum(0) { |method_infos| method_infos.sort.last.total_time }
end