2016-09-08 10:25:33 -05:00
|
|
|
# frozen_string_literal: true
|
2016-07-26 11:59:23 -05:00
|
|
|
ENV['RAILS_ENV'] ||= 'test'
|
2016-07-27 11:17:50 -05:00
|
|
|
|
2016-08-16 15:20:16 -05:00
|
|
|
# https://github.com/colszowka/simplecov
|
|
|
|
require 'simplecov'
|
|
|
|
SimpleCov.start 'rails' do
|
2016-08-16 17:09:40 -05:00
|
|
|
add_group 'Models', %w(app/models app/validators)
|
|
|
|
add_group 'Services & Workers', %w(app/workers app/services)
|
|
|
|
add_group "Jobs", 'app/jobs'
|
2016-09-20 14:22:20 -05:00
|
|
|
add_group "Policies", 'app/policies'
|
2017-03-02 10:36:10 -06:00
|
|
|
|
|
|
|
add_filter "/lib/utils/" # no need to test dev only utility classes
|
2016-08-16 15:20:16 -05:00
|
|
|
end
|
|
|
|
|
2016-07-26 11:59:23 -05:00
|
|
|
require File.expand_path('../../config/environment', __FILE__)
|
|
|
|
require 'rails/test_help'
|
2016-07-26 18:43:27 -05:00
|
|
|
require 'minitest/reporters'
|
2016-09-19 16:40:56 -05:00
|
|
|
require 'policy_assertions'
|
2016-08-16 12:08:13 -05:00
|
|
|
Dir[Rails.root.join("test/test_helpers/**/*.rb")].each { |f| require f }
|
|
|
|
|
2016-07-26 18:43:27 -05:00
|
|
|
Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(color: true)]
|
2016-07-26 11:59:23 -05:00
|
|
|
|
|
|
|
class ActiveSupport::TestCase
|
2017-01-12 18:39:12 -06:00
|
|
|
ActiveRecord::Migration.maintain_test_schema!
|
2016-07-26 18:43:27 -05:00
|
|
|
ActiveRecord::Migration.check_pending!
|
|
|
|
|
2016-07-26 11:59:23 -05:00
|
|
|
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
|
|
|
fixtures :all
|
|
|
|
|
|
|
|
# Add more helper methods to be used by all tests here...
|
2016-09-14 17:05:37 -05:00
|
|
|
include AuthTestHelper
|
2016-07-26 11:59:23 -05:00
|
|
|
end
|