Keep a blank line before and after private Keep a blank line before and after protected Remove extra empty line at class body end Remove extra blank line Add final newline Use 2 (not 3) spaces for indentation Use 2 (not 4) spaces for indentation Remove space before comma Add space after comma Remove trailing whitespaces Remove unnecessary spacing Use snake_case for variable names Do not use then for multi-line if Remove unused block argument - i Use the new Ruby 1.9 hash syntax Remove unused assignment to variable Indent when as deep as case Align attributes Align end with def
62 lines
2.3 KiB
Ruby
62 lines
2.3 KiB
Ruby
Rails.application.configure do
|
|
# Settings specified here will take precedence over those in config/application.rb.
|
|
|
|
# The test environment is used exclusively to run your application's
|
|
# test suite. You never need to work with it otherwise. Remember that
|
|
# your test database is "scratch space" for the test suite and is wiped
|
|
# and recreated between test runs. Don't rely on the data there!
|
|
config.cache_classes = true
|
|
|
|
# Do not eager load code on boot. This avoids loading your whole application
|
|
# just for the purpose of running a single test. If you are using a tool that
|
|
# preloads Rails for running tests, you may have to set it to true.
|
|
config.eager_load = true
|
|
|
|
# Setting allow_corrency to false tells rails to force every request to
|
|
# "wait in line", serving one after the other
|
|
# Setting eager_load to true also sets allow_concurrency to true.
|
|
config.allow_concurrency = false
|
|
|
|
# Configure static file server for tests with Cache-Control for performance.
|
|
config.serve_static_files = true
|
|
config.static_cache_control = 'public, max-age=3600'
|
|
|
|
# Show full error reports and disable caching.
|
|
config.consider_all_requests_local = true
|
|
config.action_controller.perform_caching = false
|
|
|
|
# Raise exceptions instead of rendering exception templates.
|
|
config.action_dispatch.show_exceptions = false
|
|
|
|
# Disable request forgery protection in test environment.
|
|
config.action_controller.allow_forgery_protection = false
|
|
|
|
# Tell Action Mailer not to deliver emails to the real world.
|
|
# The :test delivery method accumulates sent emails in the
|
|
# ActionMailer::Base.deliveries array.
|
|
config.action_mailer.delivery_method = :test
|
|
config.action_mailer.default_url_options = {
|
|
host: 'test'
|
|
}
|
|
config.action_mailer.asset_host = 'http://consul.test'
|
|
|
|
# Randomize the order test cases are executed.
|
|
config.active_support.test_order = :random
|
|
|
|
# Print deprecation notices to the stderr.
|
|
config.active_support.deprecation = :stderr
|
|
|
|
# Raises error for missing translations
|
|
# config.action_view.raise_on_missing_translations = true
|
|
|
|
config.cache_store = :null_store
|
|
|
|
config.after_initialize do
|
|
Bullet.enable = true
|
|
Bullet.bullet_logger = true
|
|
if ENV['BULLET']
|
|
Bullet.raise = true # raise an error if n+1 query occurs
|
|
end
|
|
end
|
|
|
|
end |