mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
adds config_file_location for AR setup to address different setups
This commit is contained in:
parent
0d334c37f5
commit
9bd76e743d
1 changed files with 5 additions and 1 deletions
|
@ -7,9 +7,13 @@ module DatabaseCleaner
|
|||
def self.available_strategies
|
||||
%w[truncation transaction deletion]
|
||||
end
|
||||
|
||||
def self.config_file_location=(path)
|
||||
@config_file_location = path
|
||||
end
|
||||
|
||||
def self.config_file_location
|
||||
"#{DatabaseCleaner.app_root}/config/database.yml"
|
||||
@config_file_location ||= "#{DatabaseCleaner.app_root}/config/database.yml"
|
||||
end
|
||||
|
||||
module Base
|
||||
|
|
Loading…
Reference in a new issue