diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-14 19:32:09 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-14 19:32:09 -0700 |
commit | c09a5ffea7780a0f940f3f963c892f0ae1316802 (patch) | |
tree | e5908025ddccf62dc183f6e6ced4d87bf265b28a /actionpack | |
parent | a9f9ae385e2145b7f0d1ae43a7b66ed280b220b9 (diff) | |
parent | 6eee1dd62c85e23d84f16e8f300d8aba77bd5c64 (diff) | |
download | rails-c09a5ffea7780a0f940f3f963c892f0ae1316802.tar.gz rails-c09a5ffea7780a0f940f3f963c892f0ae1316802.tar.bz2 rails-c09a5ffea7780a0f940f3f963c892f0ae1316802.zip |
Merge branch 'arel'
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 79d028b221..1e13e21419 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 |