2010-08-27 16:35:26 -04:00
|
|
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
|
|
|
|
$LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')))
|
2009-10-14 23:03:38 -04:00
|
|
|
require 'aasm'
|
|
|
|
|
2011-01-13 02:58:20 -05:00
|
|
|
require 'rspec'
|
|
|
|
require 'rspec/autorun'
|
2011-09-08 13:20:48 -04:00
|
|
|
|
|
|
|
# require 'ruby-debug'; Debugger.settings[:autoeval] = true; debugger; rubys_debugger = 'annoying'
|
|
|
|
# require 'ruby-debug/completion'
|
2009-10-14 23:03:38 -04:00
|
|
|
|
2011-08-31 17:49:09 -04:00
|
|
|
def load_schema
|
|
|
|
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
|
|
|
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
|
|
|
ActiveRecord::Base.establish_connection(config['sqlite3'])
|
|
|
|
load(File.dirname(__FILE__) + "/schema.rb")
|
|
|
|
end
|
2011-09-16 10:57:23 -04:00
|
|
|
|
2013-04-21 12:43:03 -04:00
|
|
|
# custom spec helpers
|
2011-09-16 10:57:23 -04:00
|
|
|
Dir[File.dirname(__FILE__) + "/spec_helpers/**/*.rb"].sort.each { |f| require File.expand_path(f) }
|
2013-04-21 12:43:03 -04:00
|
|
|
|
|
|
|
# example model classes
|
|
|
|
Dir[File.dirname(__FILE__) + "/models/*.rb"].sort.each { |f| require File.expand_path(f) }
|