From 10cab35d3b9e87e4b182162f7783c220cf2a937f Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 5 Feb 2011 15:52:16 -0800 Subject: Allow page_cache_directory to be set as a Pathname For example, page_cache_directory = Rails.root.join("public/cache") Signed-off-by: Santiago Pastorino --- actionpack/test/controller/caching_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index af02c7f9fa..cc393d3ef4 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -156,6 +156,17 @@ class PageCachingTest < ActionController::TestCase assert_page_not_cached :ok end + def test_page_caching_directory_set_as_pathname + begin + ActionController::Base.page_cache_directory = Pathname.new(FILE_STORE_PATH) + get :ok + assert_response :ok + assert_page_cached :ok + ensure + ActionController::Base.page_cache_directory = FILE_STORE_PATH + end + end + private def assert_page_cached(action, message = "#{action} should have been cached") assert page_cached?(action), message -- cgit v1.2.3