Wrap straggling mocha user with uses_mocha block

This commit is contained in:
Jeremy Kemper
2008-11-08 22:43:56 -05:00
parent eda9f49d57
commit 8bfd5edbcf

View File

@@ -291,11 +291,13 @@ class ActionCacheTest < ActionController::TestCase
ActionController::Base.use_accept_header = old_use_accept_header
end
def test_action_cache_with_store_options
MockTime.expects(:now).returns(12345).once
@controller.expects(:read_fragment).with('hostname.com/action_caching_test', :expires_in => 1.hour).once
@controller.expects(:write_fragment).with('hostname.com/action_caching_test', '12345.0', :expires_in => 1.hour).once
get :index
uses_mocha 'test action cache' do
def test_action_cache_with_store_options
MockTime.expects(:now).returns(12345).once
@controller.expects(:read_fragment).with('hostname.com/action_caching_test', :expires_in => 1.hour).once
@controller.expects(:write_fragment).with('hostname.com/action_caching_test', '12345.0', :expires_in => 1.hour).once
get :index
end
end
def test_action_cache_with_custom_cache_path