require File.dirname(__FILE__) + '/test_helper' class ControllerWithBehaviourCachingEnabledForActionTest < Test::Unit::TestCase def setup @controller = ControllerStub.new @controller.class.send(:caches_behaviour, :index) @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new get :index @controller.apply_behaviour "#foo:click", "alert('hello')" end def test_should_mark_behaviour_script_as_having_cache_enabled @controller.send(:store_js_behaviours) assert assigns(:js_behaviours).cache? end end