diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-06-11 15:59:23 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-06-14 12:10:17 +0300 |
commit | 6673cf7071094e87d473459452a2d0e4c2ccfebe (patch) | |
tree | 926d5c944b8fd71c1fa2db6ddbc5fc397722112e /activerecord | |
parent | 326914dd3a15e04851c9ef4a47edeb3dad2ec381 (diff) | |
download | rails-6673cf7071094e87d473459452a2d0e4c2ccfebe.tar.gz rails-6673cf7071094e87d473459452a2d0e4c2ccfebe.tar.bz2 rails-6673cf7071094e87d473459452a2d0e4c2ccfebe.zip |
Use `require_relative` instead of `require` with full path
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/Rakefile | 4 | ||||
-rwxr-xr-x | activerecord/bin/test | 2 | ||||
-rw-r--r-- | activerecord/test/cases/errors_test.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile index 2d0d5bd657..fe5f9d1071 100644 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -1,7 +1,7 @@ require "rake/testtask" -require File.expand_path("test/config", __dir__) -require File.expand_path("test/support/config", __dir__) +require_relative "test/config" +require_relative "test/support/config" def run_without_aborting(*tasks) errors = [] diff --git a/activerecord/bin/test b/activerecord/bin/test index 3a9547e5c1..ab69f4f603 100755 --- a/activerecord/bin/test +++ b/activerecord/bin/test @@ -1,7 +1,7 @@ #!/usr/bin/env ruby COMPONENT_ROOT = File.expand_path("..", __dir__) -require File.expand_path("../tools/test", COMPONENT_ROOT) +require_relative "../../tools/test" module Minitest def self.plugin_active_record_options(opts, options) diff --git a/activerecord/test/cases/errors_test.rb b/activerecord/test/cases/errors_test.rb index 73feb831d0..e90669e0c7 100644 --- a/activerecord/test/cases/errors_test.rb +++ b/activerecord/test/cases/errors_test.rb @@ -1,4 +1,4 @@ -require_relative "../cases/helper" +require "cases/helper" class ErrorsTest < ActiveRecord::TestCase def test_can_be_instantiated_with_no_args |