Improve test env config

This commit is contained in:
Artur Beljajev 2018-06-05 17:33:30 +03:00
parent 9b316b6a49
commit 9f61dfdae7

View file

@ -12,7 +12,7 @@ Rails.application.configure do
# preloads Rails for running tests, you may have to set it to true. # preloads Rails for running tests, you may have to set it to true.
config.eager_load = true config.eager_load = true
# Configure static asset server for tests with Cache-Control for performance. # Configure static file server for tests with Cache-Control for performance.
config.serve_static_files = true config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600' config.static_cache_control = 'public, max-age=3600'
@ -31,22 +31,16 @@ Rails.application.configure do
# ActionMailer::Base.deliveries array. # ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test config.action_mailer.delivery_method = :test
ActiveSupport::Deprecation.silenced = true # Randomize the order test cases are executed.
config.active_support.test_order = :random
# For rails-settings-cached conflict # Print deprecation notices to the stderr.
config.cache_store = :file_store, 'tmp/cache_test' config.active_support.deprecation = :raise
# Raises error for missing translations
config.action_view.raise_on_missing_translations = true config.action_view.raise_on_missing_translations = true
# The available log levels are: :debug, :info, :warn, :error, :fatal, and :unknown, config.cache_store = :null_store
# corresponding to the log level numbers from 0 up to 5 respectively
config.log_level = :debug
config.active_job.queue_adapter = :test
config.logger = ActiveSupport::Logger.new(nil)
config.active_support.test_order = :random # :random is the default in Rails 5
end end
# In this mode, any jobs you queue will be run in the same thread, synchronously Que.mode = :sync
# (that is, MyJob.enqueue runs the job and won't return until it's completed).
# This makes your application's behavior easier to test
Que.mode = :sync