aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/activerecord/controller_runtime_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-02-15 10:20:11 -0600
committerJoshua Peek <josh@joshpeek.com>2010-02-15 10:20:11 -0600
commiteec2d301d4ce9df9c71c1a5aa63053eb970b6818 (patch)
tree760bf54f7802d3e4f76e2db5bc642bb52637b532 /actionpack/test/activerecord/controller_runtime_test.rb
parent7cff54f5d3ae2e364f0d147ceb86ea701b21389c (diff)
downloadrails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.tar.gz
rails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.tar.bz2
rails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.zip
Fix test load paths for those not using bundler
Diffstat (limited to 'actionpack/test/activerecord/controller_runtime_test.rb')
-rw-r--r--actionpack/test/activerecord/controller_runtime_test.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/test/activerecord/controller_runtime_test.rb b/actionpack/test/activerecord/controller_runtime_test.rb
index ed8e324938..f044e714d8 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'
@@ -12,7 +15,7 @@ class ControllerRuntimeSubscriberTest < ActionController::TestCase
render :inline => "<%= Project.all %>"
end
end
-
+
include Rails::Subscriber::TestHelper
tests SubscriberController
@@ -31,7 +34,7 @@ class ControllerRuntimeSubscriberTest < 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 ControllerRuntimeSubscriberTest < 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