aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-11 00:51:05 +0200
committerXavier Noria <fxn@hashref.com>2016-08-11 01:03:14 +0200
commit432222fae13c29b4696905d7c614bc80f67a6051 (patch)
tree9824839cc9eb5849f0b69271c66becd272d70627 /actionmailer
parenta1623fc66788e46b459a8f01a8603a757aff11bf (diff)
downloadrails-432222fae13c29b4696905d7c614bc80f67a6051.tar.gz
rails-432222fae13c29b4696905d7c614bc80f67a6051.tar.bz2
rails-432222fae13c29b4696905d7c614bc80f67a6051.zip
prefer __dir__ over __FILE__ in File.expand_path
Thinking .. relative to files is not natural, we are used to think "parent of a directory", and we have __dir__ nowadays.
Diffstat (limited to 'actionmailer')
-rwxr-xr-xactionmailer/bin/test4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionmailer/bin/test b/actionmailer/bin/test
index 404cabba51..84a05bba08 100755
--- a/actionmailer/bin/test
+++ b/actionmailer/bin/test
@@ -1,4 +1,6 @@
#!/usr/bin/env ruby
-COMPONENT_ROOT = File.expand_path("../../", __FILE__)
+
+COMPONENT_ROOT = File.expand_path("..", __dir__)
require File.expand_path("../tools/test", COMPONENT_ROOT)
+
exit Minitest.run(ARGV)