Methods
S
T
Instance Public methods
setup()
# File rails/actionpack/test/controller/caching_test.rb, line 32
def setup
  ActionController::Routing::Routes.draw do |map|
    map.main '', :controller => 'posts'
    map.resources :posts
    map.connect ':controller/:action/:id'
  end

  @request = ActionController::TestRequest.new
  @request.host = 'hostname.com'

  @response   = ActionController::TestResponse.new
  @controller = PageCachingTestController.new

  @params = {:controller => 'posts', :action => 'index', :only_path => true, :skip_relative_url_root => true}
  @rewriter = ActionController::UrlRewriter.new(@request, @params)

  FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
  FileUtils.mkdir_p(FILE_STORE_PATH)
end
teardown()
# File rails/actionpack/test/controller/caching_test.rb, line 52
def teardown
  FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
end
test_page_caching_resources_saves_to_correct_path_with_extension_even_if_default_route()
# File rails/actionpack/test/controller/caching_test.rb, line 56
def test_page_caching_resources_saves_to_correct_path_with_extension_even_if_default_route
  @params[:format] = 'rss'
  assert_equal '/posts.rss', @rewriter.rewrite(@params)
  @params[:format] = nil
  assert_equal '/', @rewriter.rewrite(@params)
end
test_should_cache_get_with_ok_status()
# File rails/actionpack/test/controller/caching_test.rb, line 63
def test_should_cache_get_with_ok_status
  get :ok
  assert_response :ok
  assert_page_cached :ok, "get with ok status should have been cached"
end