spec/spec_helper.rb in redis-classy-1.0.1 vs spec/spec_helper.rb in redis-classy-1.0.2
- old
+ new
@@ -8,6 +8,10 @@
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
RSpec.configure do |config|
# Use database 15 for testing so we don't accidentally step on you real data.
Redis::Classy.db = Redis.new(:db => 15)
+ unless Redis::Classy.keys.empty?
+ puts '[ERROR]: Redis database 15 not empty! If you are sure, run "rake flushdb" beforehand.'
+ exit!
+ end
end