aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-10-14 19:31:29 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-10-14 19:31:29 -0700
commit6eee1dd62c85e23d84f16e8f300d8aba77bd5c64 (patch)
tree362df7f3d0af2982779595a2aa2d6102e781f11c /actionpack
parent6be5f45019ef22597d76ab45471f1bf1f8c89759 (diff)
downloadrails-6eee1dd62c85e23d84f16e8f300d8aba77bd5c64.tar.gz
rails-6eee1dd62c85e23d84f16e8f300d8aba77bd5c64.tar.bz2
rails-6eee1dd62c85e23d84f16e8f300d8aba77bd5c64.zip
Clarify AR dependency
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/caching_test.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 69b0eb5e3e..495b431307 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -149,7 +149,9 @@ end
class ActionCachingTestController < ActionController::Base
rescue_from(Exception) { head 500 }
- rescue_from(ActiveRecord::RecordNotFound) { head :not_found }
+ if defined? ActiveRecord
+ rescue_from(ActiveRecord::RecordNotFound) { head :not_found }
+ end
caches_action :index, :redirected, :forbidden, :if => Proc.new { |c| !c.request.format.json? }, :expires_in => 1.hour
caches_action :show, :cache_path => 'http://test.host/custom/show'
@@ -474,11 +476,13 @@ class ActionCacheTest < ActionController::TestCase
assert_response :success
end
- def test_record_not_found_returns_404_for_multiple_requests
- get :record_not_found
- assert_response 404
- get :record_not_found
- assert_response 404
+ if defined? ActiveRecord
+ def test_record_not_found_returns_404_for_multiple_requests
+ get :record_not_found
+ assert_response 404
+ get :record_not_found
+ assert_response 404
+ end
end
def test_four_oh_four_returns_404_for_multiple_requests