diff options
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r-- | activesupport/test/caching_test.rb | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index e7dac4cc6b..d8506de986 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -45,29 +45,27 @@ class CacheStoreSettingTest < Test::Unit::TestCase end end -uses_mocha 'high-level cache store tests' do - class CacheStoreTest < Test::Unit::TestCase - def setup - @cache = ActiveSupport::Cache.lookup_store(:memory_store) - end +class CacheStoreTest < Test::Unit::TestCase + def setup + @cache = ActiveSupport::Cache.lookup_store(:memory_store) + end - def test_fetch_without_cache_miss - @cache.stubs(:read).with('foo', {}).returns('bar') - @cache.expects(:write).never - assert_equal 'bar', @cache.fetch('foo') { 'baz' } - end + def test_fetch_without_cache_miss + @cache.stubs(:read).with('foo', {}).returns('bar') + @cache.expects(:write).never + assert_equal 'bar', @cache.fetch('foo') { 'baz' } + end - def test_fetch_with_cache_miss - @cache.stubs(:read).with('foo', {}).returns(nil) - @cache.expects(:write).with('foo', 'baz', {}) - assert_equal 'baz', @cache.fetch('foo') { 'baz' } - end + def test_fetch_with_cache_miss + @cache.stubs(:read).with('foo', {}).returns(nil) + @cache.expects(:write).with('foo', 'baz', {}) + assert_equal 'baz', @cache.fetch('foo') { 'baz' } + end - def test_fetch_with_forced_cache_miss - @cache.expects(:read).never - @cache.expects(:write).with('foo', 'bar', :force => true) - @cache.fetch('foo', :force => true) { 'bar' } - end + def test_fetch_with_forced_cache_miss + @cache.expects(:read).never + @cache.expects(:write).with('foo', 'bar', :force => true) + @cache.fetch('foo', :force => true) { 'bar' } end end |