Skip to content
Browse files

Delegate run_test to @harness

  • Loading branch information...
1 parent 09c70a0 commit f93a6d99e61f3766384d33cc8d1aaf212d8f4b0e @jeremy jeremy committed Jun 15, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/lib/active_support/testing/performance.rb
View
6 activesupport/lib/active_support/testing/performance.rb
@@ -83,7 +83,7 @@ def run_profile(metric)
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 @@ def report
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 @@ def with_output_file
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

0 comments on commit f93a6d9

Please sign in to comment.
Something went wrong with that request. Please try again.