aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/actionpack/abstract
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-05-15 14:17:28 +0000
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-05-23 00:53:51 +0300
commit40bdbce191ad90dfea43dad51fac5c4726b89392 (patch)
treea6c6d8369874775cdc6cf1d4b90684490c0198bc /actionview/test/actionpack/abstract
parentd414881a342d849d65810a037c0b1baff8538e41 (diff)
downloadrails-40bdbce191ad90dfea43dad51fac5c4726b89392.tar.gz
rails-40bdbce191ad90dfea43dad51fac5c4726b89392.tar.bz2
rails-40bdbce191ad90dfea43dad51fac5c4726b89392.zip
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
Diffstat (limited to 'actionview/test/actionpack/abstract')
-rw-r--r--actionview/test/actionpack/abstract/abstract_controller_test.rb4
-rw-r--r--actionview/test/actionpack/abstract/helper_test.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/actionview/test/actionpack/abstract/abstract_controller_test.rb b/actionview/test/actionpack/abstract/abstract_controller_test.rb
index a2cd3deb58..8f65a61493 100644
--- a/actionview/test/actionpack/abstract/abstract_controller_test.rb
+++ b/actionview/test/actionpack/abstract/abstract_controller_test.rb
@@ -42,7 +42,7 @@ module AbstractController
super
end
- append_view_path File.expand_path(File.join(File.dirname(__FILE__), "views"))
+ append_view_path File.expand_path("views", __dir__)
end
class Me2 < RenderingController
@@ -152,7 +152,7 @@ module AbstractController
class OverridingLocalPrefixes < AbstractController::Base
include AbstractController::Rendering
include ActionView::Rendering
- append_view_path File.expand_path(File.join(File.dirname(__FILE__), "views"))
+ append_view_path File.expand_path("views", __dir__)
def index
render
diff --git a/actionview/test/actionpack/abstract/helper_test.rb b/actionview/test/actionpack/abstract/helper_test.rb
index 83237518d7..13922e4485 100644
--- a/actionview/test/actionpack/abstract/helper_test.rb
+++ b/actionview/test/actionpack/abstract/helper_test.rb
@@ -1,6 +1,6 @@
require "abstract_unit"
-ActionController::Base.helpers_path = File.expand_path("../../../fixtures/helpers", __FILE__)
+ActionController::Base.helpers_path = File.expand_path("../../fixtures/helpers", __dir__)
module AbstractController
module Testing
@@ -51,7 +51,7 @@ module AbstractController
class AbstractInvalidHelpers < AbstractHelpers
include ActionController::Helpers
- path = File.expand_path("../../../fixtures/helpers_missing", __FILE__)
+ path = File.expand_path("../../fixtures/helpers_missing", __dir__)
$:.unshift(path)
self.helpers_path = path
end