aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/performance_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/performance_test.rb')
-rw-r--r--actionpack/lib/action_dispatch/testing/performance_test.rb4
1 files changed, 3 insertions, 1 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