2017-02-10 06:39:28 -05:00
|
|
|
# encoding: utf-8
|
2018-01-12 05:41:12 -05:00
|
|
|
|
2017-02-10 06:34:45 -05:00
|
|
|
begin
|
|
|
|
require 'redis-objects'
|
2018-01-12 05:41:12 -05:00
|
|
|
require 'redis/objects/version'
|
2017-02-10 06:34:45 -05:00
|
|
|
puts "redis-objects gem found, running Redis specs \e[32m#{'✔'}\e[0m"
|
2017-07-11 06:42:49 -04:00
|
|
|
|
2018-01-12 05:41:12 -05:00
|
|
|
Redis.current = Redis.new(host: (ENV['REDIS_HOST'] || '127.0.0.1'),
|
|
|
|
port: (ENV['REDIS_PORT'] || 6379))
|
2017-07-11 06:42:49 -04:00
|
|
|
|
|
|
|
RSpec.configure do |c|
|
|
|
|
c.before(:each) do
|
|
|
|
Redis.current.keys('redis_*').each { |k| Redis.current.del k }
|
|
|
|
end
|
|
|
|
end
|
2017-02-10 06:34:45 -05:00
|
|
|
rescue LoadError
|
|
|
|
puts "redis-objects gem not found, not running Redis specs \e[31m#{'✖'}\e[0m"
|
|
|
|
end
|