aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/dependencies_test_helpers.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-07-17 07:10:27 -0600
committerGitHub <noreply@github.com>2017-07-17 07:10:27 -0600
commit404eceba8c8f0951407c2508567f6abefec76e4c (patch)
treecb8c690084083b6aee4a70ad29c24c0050f88bed /activesupport/test/dependencies_test_helpers.rb
parente505bc8acd4448030fd4d2f85796bdb61d45a5b1 (diff)
parentfbade51248ea48db87703ba7418badbd3ed85e36 (diff)
downloadrails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.gz
rails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.bz2
rails-404eceba8c8f0951407c2508567f6abefec76e4c.zip
Merge branch 'master' into make-reverse-merge-bang-order-consistent
Diffstat (limited to 'activesupport/test/dependencies_test_helpers.rb')
-rw-r--r--activesupport/test/dependencies_test_helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/dependencies_test_helpers.rb b/activesupport/test/dependencies_test_helpers.rb
index 9bc63ed89e..b54a7e70c8 100644
--- a/activesupport/test/dependencies_test_helpers.rb
+++ b/activesupport/test/dependencies_test_helpers.rb
@@ -1,7 +1,9 @@
+# frozen_string_literal: true
+
module DependenciesTestHelpers
def with_loading(*from)
old_mechanism, ActiveSupport::Dependencies.mechanism = ActiveSupport::Dependencies.mechanism, :load
- this_dir = File.dirname(__FILE__)
+ this_dir = __dir__
parent_dir = File.dirname(this_dir)
path_copy = $LOAD_PATH.dup
$LOAD_PATH.unshift(parent_dir) unless $LOAD_PATH.include?(parent_dir)