integration_test_helper.rb 594 B

123456789101112131415161718192021222324252627282930
  1. ENV['RAILS_ENV'] = 'test'
  2. require File.expand_path('../../config/environment', __FILE__)
  3. require 'rails/test_help'
  4. require 'cache'
  5. class ActiveSupport::TestCase
  6. # disable transactions
  7. #self.use_transactional_fixtures = false
  8. # clear cache
  9. Cache.clear
  10. # load seeds
  11. load "#{Rails.root}/db/seeds.rb"
  12. load "#{Rails.root}/test/fixtures/seeds.rb"
  13. setup do
  14. # clear cache
  15. Cache.clear
  16. # remove background jobs
  17. Delayed::Job.destroy_all
  18. # set current user
  19. UserInfo.current_user_id = nil
  20. end
  21. # Add more helper methods to be used by all tests here...
  22. end