Permalink
Browse files

Rails 3 application can run performance tests now. [#4171 state:resol…

…ved]
  • Loading branch information...
1 parent 66d57d7 commit 835f5d0269a8d3615585119e77f1ba7d601c943b @rizwanreza rizwanreza committed Mar 28, 2010
@@ -1,7 +1,7 @@
require 'active_support/testing/performance'
require 'active_support/testing/default'
-if defined?(ActiveSupport::Testing::Performance)
+begin
module ActionDispatch
# An integration test that runs a code profiler on your test methods.
# Profiling output for combinations of each test method, measurement, and
@@ -14,4 +14,6 @@ class PerformanceTest < ActionDispatch::IntegrationTest
include ActiveSupport::Testing::Default
end
end
+rescue NameError
+ $stderr.puts "Specify ruby-prof as application's dependency in Gemfile to run benchmarks."
end
@@ -2,7 +2,7 @@
require 'rails/performance_test_help'
# Profiling results for each test method are written to tmp/performance.
-class BrowsingTest < ActionController::PerformanceTest
+class BrowsingTest < ActionDispatch::PerformanceTest
def test_homepage
get '/'
end

0 comments on commit 835f5d0

Please sign in to comment.