aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/activerecord/controller_runtime_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/activerecord/controller_runtime_test.rb')
-rw-r--r--actionpack/test/activerecord/controller_runtime_test.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/test/activerecord/controller_runtime_test.rb b/actionpack/test/activerecord/controller_runtime_test.rb
index 4d2a7b9b5a..ee5fbdb0ae 100644
--- a/actionpack/test/activerecord/controller_runtime_test.rb
+++ b/actionpack/test/activerecord/controller_runtime_test.rb
@@ -1,3 +1,6 @@
+railties_path = File.expand_path('../../../../railties/lib', __FILE__)
+$:.unshift(railties_path) if File.directory?(railties_path) && !$:.include?(railties_path)
+
require 'active_record_unit'
require 'active_record/railties/controller_runtime'
require 'fixtures/project'
@@ -31,7 +34,7 @@ class ControllerRuntimeLogSubscriberTest < ActionController::TestCase
def set_logger(logger)
ActionController::Base.logger = logger
end
-
+
def test_log_with_active_record
get :show
wait
@@ -39,4 +42,4 @@ class ControllerRuntimeLogSubscriberTest < ActionController::TestCase
assert_equal 2, @logger.logged(:info).size
assert_match /\(Views: [\d\.]+ms | ActiveRecord: [\d\.]+ms\)/, @logger.logged(:info)[1]
end
-end \ No newline at end of file
+end