test/helper.rb in redis-3.0.7 vs test/helper.rb in redis-3.1.0

- old
+ new

@@ -38,19 +38,18 @@ Cannot connect to Redis. Make sure Redis is running on localhost, port #{PORT}. This testing suite connects to the database 15. - To install redis: - visit <http://redis.io/download/>. + Try this once: - To start the server: - rake start + $ rake clean - To stop the server: - rake stop + Then run the build again: + $ rake + EOS exit 1 end end @@ -211,8 +210,21 @@ }.merge(options) end def _new_client(options = {}) Redis::Distributed.new(NODES, _format_options(options).merge(:driver => ENV["conn"])) + end + end + + # Basic support for `skip` in 1.8.x + # Note: YOU MUST use `return skip(message)` in order to appropriately bail + # from a running test. + module Skipable + Skipped = Class.new(RuntimeError) + + def skip(message = nil, bt = caller) + return super if defined?(super) + + $stderr.puts("SKIPPED: #{self} #{message || 'no reason given'}") end end end