aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/bin
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 /actionview/bin
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 'actionview/bin')
-rwxr-xr-xactionview/bin/test4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/bin/test b/actionview/bin/test
index 404cabba51..84a05bba08 100755
--- a/actionview/bin/test
+++ b/actionview/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)