Sha256: 9c57c404d31ce084571ddc097ca9f63484705aafc3d18f695d41bf18ba615f16
Contents?: true
Size: 709 Bytes
Versions: 1
Compression:
Stored size: 709 Bytes
Contents
require 'spec_helper' describe HighVoltage::PagesController, 'action_caching' do it 'caches the action when action_caching is set to true', enable_caching: true do expect do HighVoltage.action_caching = true concern_reload get :show, id: :exists end.to change { action_was_cached(:exists) } end it 'does not cache the action when action_caching is set to false', enable_caching: true do expect do HighVoltage.action_caching = false concern_reload get :show, id: :exists end.to_not change { action_was_cached(:exists) } end def action_was_cached(page) ActionController::Base.cache_store.exist?("views/test.host#{page_path(page)}") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
high_voltage-2.0.0 | spec/controllers/action_caching_controller_spec.rb |