fix database_cleaner-ohm autodetected adapter loading.

This commit is contained in:
Micah Geisel 2020-02-01 12:02:06 -08:00
parent cf09333d83
commit 2c4e06aff6

View file

@ -1,4 +1,9 @@
require 'database_cleaner/redis/truncation'
begin # when database_cleaner-ohm is loaded as a gem
require 'database_cleaner/redis/truncation'
rescue LoadError # when database_cleaner is loaded as a gem
$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../../../../../adapters/database_cleaner-redis/lib")
require 'database_cleaner/redis/truncation'
end
module DatabaseCleaner
module Ohm