script/parallel-tests in moneta-0.8.1 vs script/parallel-tests in moneta-1.0.0

- old
+ new

@@ -66,9 +66,21 @@ unless serial.empty? specs -= serial parallel << serial end end + +# The activesupport cache specs also use memcached +activesupport_cache_specs = specs.grep(/active_support.+cache/) +specs -= activesupport_cache_specs + +if memcache_specs = parallel.find{ |serial| serial.all?{ |s| s.match /memcached/ } } + activesupport_cache_specs.each(&memcache_specs.method(:push)) +else + parallel += activesupport_cache_specs +end + +# All the left-overs parallel += specs.map {|s| [s] } threads = [] failed = false parallel.each do |serial|