aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/caching_test.rb
diff options
context:
space:
mode:
authorAhmed El-Daly <aeldaly@developergurus.com>2009-01-29 23:04:49 -0500
committerAhmed El-Daly <aeldaly@developergurus.com>2009-01-29 23:04:49 -0500
commit43d63298f7693a437b454b4b8ee84946af350572 (patch)
tree55166f7c3118061a1fd0df2cb3cf6ea6e31647b9 /activesupport/test/caching_test.rb
parent6623e4f92a69c2aa0a12957db430b00690d50d19 (diff)
parent24b688d31d34dc7582c8e2ac4347d0c36e3c5e10 (diff)
downloadrails-43d63298f7693a437b454b4b8ee84946af350572.tar.gz
rails-43d63298f7693a437b454b4b8ee84946af350572.tar.bz2
rails-43d63298f7693a437b454b4b8ee84946af350572.zip
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r--activesupport/test/caching_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index e8e0b41d4d..4e212f1661 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -81,6 +81,11 @@ module CacheStoreBehavior
assert_equal({:a => "b"}, @cache.read('foo'))
end
+ def test_should_read_and_write_integer
+ @cache.write('foo', 1)
+ assert_equal 1, @cache.read('foo')
+ end
+
def test_should_read_and_write_nil
@cache.write('foo', nil)
assert_equal nil, @cache.read('foo')
@@ -200,6 +205,13 @@ uses_memcached 'memcached backed store' do
end
end
+ def test_local_cache_should_read_and_write_integer
+ @cache.with_local_cache do
+ @cache.write('foo', 1)
+ assert_equal 1, @cache.read('foo')
+ end
+ end
+
def test_local_cache_of_delete
@cache.with_local_cache do
@cache.write('foo', 'bar')