Permalink
Browse files

Wrap straggling mocha user with uses_mocha block

  • Loading branch information...
1 parent fa7151c commit 76b54c5eae3a5ef211d75a71d49d365cb482f060 @jeremy jeremy committed Nov 9, 2008
Showing with 7 additions and 5 deletions.
  1. +7 −5 actionpack/test/controller/caching_test.rb
View
12 actionpack/test/controller/caching_test.rb
@@ -291,11 +291,13 @@ def test_action_cache_conditional_options
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

0 comments on commit 76b54c5

Please sign in to comment.