database_cleaner/lib/database_cleaner.rb

35 lines
754 B
Ruby
Raw Normal View History

$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
2020-01-20 19:43:01 -05:00
require 'database_cleaner/version'
require 'database_cleaner/configuration'
2019-12-12 01:44:51 -05:00
require 'database_cleaner/deprecation'
require 'forwardable'
2013-05-27 17:53:36 -04:00
module DatabaseCleaner
class << self
extend Forwardable
delegate [
:[],
:app_root=,
:app_root,
:logger=,
:logger,
:cleaners,
:cleaners=,
:strategy=,
:orm=,
:start,
:clean,
:clean_with,
:cleaning,
] => :configuration
2018-04-20 11:34:21 -04:00
attr_accessor :allow_remote_database_url, :allow_production, :url_whitelist
private
def configuration
@configuration ||= Configuration.new
end
2013-05-27 17:53:36 -04:00
end
end