Rails 2.3.5

Upgrade to Rails 2.3.5.
Also work around this bug:
 https://rails.lighthouseapp.com/projects/8994/tickets/3524
created by the aforementioned
Rails release.
This commit is contained in:
Jacques Distler 2009-11-30 19:38:34 -06:00
parent a6429f8c22
commit e3832c6f79
187 changed files with 2316 additions and 891 deletions

View file

@ -35,7 +35,9 @@ class CacheStoreSettingTest < ActiveSupport::TestCase
def test_mem_cache_fragment_cache_store_with_given_mem_cache_like_object
MemCache.expects(:new).never
store = ActiveSupport::Cache.lookup_store :mem_cache_store, stub("memcache", :get => true)
memcache = Object.new
def memcache.get() true end
store = ActiveSupport::Cache.lookup_store :mem_cache_store, memcache
assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
end
@ -325,3 +327,22 @@ uses_memcached 'memcached backed store' do
include CacheStoreBehavior
end
end
class CacheStoreLoggerTest < ActiveSupport::TestCase
def setup
@cache = ActiveSupport::Cache.lookup_store(:memory_store)
@buffer = StringIO.new
@cache.logger = Logger.new(@buffer)
end
def test_logging
@cache.fetch('foo') { 'bar' }
assert @buffer.string.present?
end
def test_mute_logging
@cache.mute { @cache.fetch('foo') { 'bar' } }
assert @buffer.string.blank?
end
end