diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-22 15:19:19 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-22 19:19:12 -0800 |
commit | f927a60d0fa33f3e0fc3c0c891ae7657a227707f (patch) | |
tree | 3a9541a4d16e0ba6a8d1afeee03f26e57a09044e /activesupport/test/caching_test.rb | |
parent | 708f4c3ae6a41a46ab36a05ea4e126392b81511b (diff) | |
download | rails-f927a60d0fa33f3e0fc3c0c891ae7657a227707f.tar.gz rails-f927a60d0fa33f3e0fc3c0c891ae7657a227707f.tar.bz2 rails-f927a60d0fa33f3e0fc3c0c891ae7657a227707f.zip |
Require mocha >= 0.9.0 for AS tests
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 |