diff options
-rw-r--r-- | actionpack/lib/action_dispatch/testing/performance_test.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/performance_test.rb b/actionpack/lib/action_dispatch/testing/performance_test.rb index 1b9a6c18b7..33a5c68b9d 100644 --- a/actionpack/lib/action_dispatch/testing/performance_test.rb +++ b/actionpack/lib/action_dispatch/testing/performance_test.rb @@ -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 @@ if defined?(ActiveSupport::Testing::Performance) include ActiveSupport::Testing::Default end end +rescue NameError + $stderr.puts "Specify ruby-prof as application's dependency in Gemfile to run benchmarks." end
\ No newline at end of file diff --git a/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb b/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb index a3dc38d9e4..867fc8c985 100644 --- a/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb +++ b/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb @@ -2,7 +2,7 @@ require 'test_helper' 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 |