views:

44

answers:

1

Is it possible to turn on page caching for a functional test? The following didn't work:

class ArticlesControllerTest < ActionController::TestCase
 def setup
    ActionController::Base.public_class_method :page_cache_path
    ActionController::Base.perform_caching = true
 end
end

thanks in advance

Deb

A: 

I couldn't figure out why this was not working, so I ended up enabling caching directly on environments/test.rb:

config.action_controller.perform_caching             = true
deb