aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/generators_test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/generators_test_helper.rb')
-rw-r--r--railties/test/generators/generators_test_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb
index 2cdddc8713..5fb331e197 100644
--- a/railties/test/generators/generators_test_helper.rb
+++ b/railties/test/generators/generators_test_helper.rb
@@ -9,7 +9,7 @@ module Rails
class << self
remove_possible_method :root
def root
- @root ||= Pathname.new(File.expand_path("../../fixtures", __FILE__))
+ @root ||= Pathname.new(File.expand_path("../fixtures", __dir__))
end
end
end
@@ -41,7 +41,7 @@ module GeneratorsTestHelper
end
def copy_routes
- routes = File.expand_path("../../../lib/rails/generators/rails/app/templates/config/routes.rb", __FILE__)
+ routes = File.expand_path("../../lib/rails/generators/rails/app/templates/config/routes.rb", __dir__)
destination = File.join(destination_root, "config")
FileUtils.mkdir_p(destination)
FileUtils.cp routes, destination