instance method
run_test
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v3.2.22.5Available in: v3.1.12 v3.2.22.5
Signature
run_test(metric, mode)
No documentation comment.
Parameters
-
metricreq -
modereq
Source
# File activesupport/lib/active_support/testing/performance.rb, line 60
def run_test(metric, mode)
result = '.'
begin
run_callbacks :setup
setup
metric.send(mode) { __send__ method_name }
rescue Exception => e
result = @runner.puke(self.class, method_name, e)
ensure
begin
teardown
run_callbacks :teardown, :enumerator => :reverse_each
rescue Exception => e
result = @runner.puke(self.class, method_name, e)
end
end
result
end
Defined in activesupport/lib/active_support/testing/performance.rb line 60
· View on GitHub
· Improve this page
· Find usages on GitHub