make existing YAML dependency explicit

(the ActiveRecord tests always have YAML loaded already,
but what about when you're not running the ActiveRecord
tests?)
This commit is contained in:
Rob Hunter 2013-10-07 00:55:10 +11:00
parent 9be69424dc
commit 307f1ca4ce
1 changed files with 2 additions and 0 deletions

View File

@ -1,3 +1,5 @@
require 'yaml'
def db_config
config_path = 'db/config.yml'
@db_config ||= YAML.load(IO.read(config_path))