Use require_relative where possible

This commit is contained in:
Karl Erik Õunapuu 2020-05-29 16:28:57 +03:00
parent cee260069f
commit f47805a767
4 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake, # Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__) require_relative 'config/application'
Rails.application.load_tasks Rails.application.load_tasks

View file

@ -1,6 +1,6 @@
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__) require_relative 'config/environment'
run Rails.application run Rails.application
# turn automatic que temp off # turn automatic que temp off

View file

@ -1,3 +1,4 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile. require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup'

View file

@ -10,7 +10,7 @@ if ENV['COVERAGE']
end end
ENV['RAILS_ENV'] ||= 'test' ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__) require_relative '../config/environment'
require 'rails/test_help' require 'rails/test_help'
require 'minitest/mock' require 'minitest/mock'
require 'capybara/rails' require 'capybara/rails'
@ -42,6 +42,9 @@ CompanyRegister::Client = CompanyRegisterClientStub
EInvoice.provider = EInvoice::Providers::TestProvider.new EInvoice.provider = EInvoice::Providers::TestProvider.new
class ActiveSupport::TestCase class ActiveSupport::TestCase
# Run tests in parallel with specified workers
parallelize(workers: :number_of_processors)
ActiveRecord::Migration.check_pending! ActiveRecord::Migration.check_pending!
fixtures :all fixtures :all