trabajo-afectivo/test/integration_test_helper.rb

30 lines
548 B
Ruby
Raw Normal View History

ENV['RAILS_ENV'] = 'test'
2014-11-14 06:42:39 +00:00
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'cache'
2015-04-27 21:01:04 +00:00
class ActiveSupport::TestCase
# disable transactions
#self.use_transactional_fixtures = false
2014-11-14 06:42:39 +00:00
2015-04-27 21:01:04 +00:00
# clear cache
Cache.clear
2014-11-14 06:42:39 +00:00
2015-04-27 21:01:04 +00:00
# load seeds
load "#{Rails.root}/db/seeds.rb"
2014-11-14 06:42:39 +00:00
2015-04-27 21:01:04 +00:00
setup do
2015-02-25 23:44:29 +00:00
2015-04-27 21:01:04 +00:00
# clear cache
Cache.clear
2014-11-14 06:42:39 +00:00
# remove background jobs
Delayed::Job.destroy_all
2015-04-27 21:01:04 +00:00
# set current user
UserInfo.current_user_id = nil
2015-04-27 20:49:17 +00:00
end
2015-04-27 21:01:04 +00:00
# Add more helper methods to be used by all tests here...
end