spec/spec_helper.rb in fluentd-server-0.1.0 vs spec/spec_helper.rb in fluentd-server-0.2.0
- old
+ new
@@ -1,13 +1,18 @@
require 'rubygems'
require 'rspec'
+require 'pry'
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
-require 'fluentd_server'
-require 'fluentd_server/environments'
+ENV['RACK_ENV'] = 'test'
+ENV['JOB_DIR'] = 'spec/tmp'
+
+# NOTE: DATABASE_URL in .env must be commented out
+require 'fluentd_server'
+require 'fluentd_server/environment'
require 'rake'
require 'sinatra/activerecord/rake'
-Rake::Task['db:migrate'].invoke
+Rake::Task['db:schema:load'].invoke
if ENV['TRAVIS']
require 'coveralls'
Coveralls.wear!
end