diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-28 23:55:43 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-28 23:55:43 -0700 |
commit | e0f56fc96d539db8f94ed6c8ef0ec2a4bddf6393 (patch) | |
tree | f1028ac91c1a7957326840a1bafd3d47c9e18d35 /activesupport | |
parent | 96af8b69a4ca5f5bd349d12783d6eb2724e540d3 (diff) | |
download | rails-e0f56fc96d539db8f94ed6c8ef0ec2a4bddf6393.tar.gz rails-e0f56fc96d539db8f94ed6c8ef0ec2a4bddf6393.tar.bz2 rails-e0f56fc96d539db8f94ed6c8ef0ec2a4bddf6393.zip |
Distinguish missing memcache from missing memcache server
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/abstract_unit.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index c997bcbb66..428a06b0bf 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -11,10 +11,12 @@ require 'active_support/test_case' def uses_memcached(test_name) require 'memcache' - MemCache.new('localhost').stats - yield -rescue MemCache::MemCacheError - $stderr.puts "Skipping #{test_name} tests. Start memcached and try again." + begin + MemCache.new('localhost').stats + yield + rescue MemCache::MemCacheError + $stderr.puts "Skipping #{test_name} tests. Start memcached and try again." + end end def with_kcode(code) |