diff options
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) |