mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Merge pull request #619 from DatabaseCleaner/fix_and_deprecate_ohm_adapter
Fix and deprecate Ohm adapter
This commit is contained in:
commit
a8d1482037
2 changed files with 8 additions and 1 deletions
|
@ -2,6 +2,8 @@ require "database_cleaner/ohm/version"
|
|||
require "database_cleaner"
|
||||
require "database_cleaner/ohm/truncation"
|
||||
|
||||
DatabaseCleaner.deprecate "The Ohm adapter for DatabaseCleaner is deprecated, and will be removed in v2.0. Please use the Redis adapter instead."
|
||||
|
||||
module DatabaseCleaner::Ohm
|
||||
def self.default_strategy
|
||||
:truncation
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue