Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "created unit tests and fixed bug that failed tests"

This reverts commit be1dbf3.
  • Loading branch information...
commit 9b4aa9bcd9cb03f689eed374e870dd5a46e4a661 1 parent be1dbf3
@dhh dhh authored
View
2  activesupport/lib/active_support/cache.rb
@@ -138,7 +138,7 @@ def silence!
# cache.fetch("foo") # => nil
def fetch(key, options = {})
@logger_off = true
- if !options[:force] && ((value = read(key, options)) || exist?(key, options))
+ if !options[:force] && value = read(key, options)
@logger_off = false
log("hit", key, options)
value
View
22 activesupport/test/caching_test.rb
@@ -90,27 +90,7 @@ def test_should_read_and_write_nil
@cache.write('foo', nil)
assert_equal nil, @cache.read('foo')
end
-
- def test_should_read_and_write_false
- @cache.write('foo', false)
- assert_equal false, @cache.read('foo')
- end
-
- def test_should_read_and_write_true
- @cache.write('foo', true)
- assert_equal true, @cache.read('foo')
- end
-
- def test_fetch_false_without_cache_miss
- @cache.write('foo', false)
- assert_equal false, @cache.fetch('foo') { 'baz' }
- end
-
- def test_fetch_nil_without_cache_miss
- @cache.write('foo', nil)
- assert_equal nil, @cache.fetch('foo') { 'baz' }
- end
-
+
def test_fetch_without_cache_miss
@cache.write('foo', 'bar')
assert_equal 'bar', @cache.fetch('foo') { 'baz' }
Please sign in to comment.
Something went wrong with that request. Please try again.