aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-07-12 17:51:35 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-07-12 18:29:31 +0900
commit824246f66b21c89d4a646a3cb73e46134d97469d (patch)
tree5cc0d38a225055a4951159a6fdf907502eed11d6 /railties/lib/rails/commands
parente0a7e7b0ee3204fdc5ef8580450582bd55340d3e (diff)
downloadrails-824246f66b21c89d4a646a3cb73e46134d97469d.tar.gz
rails-824246f66b21c89d4a646a3cb73e46134d97469d.tar.bz2
rails-824246f66b21c89d4a646a3cb73e46134d97469d.zip
make test runner work correctly inside engine
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r--railties/lib/rails/commands/test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/test.rb b/railties/lib/rails/commands/test.rb
index fe5307788a..dd069f081f 100644
--- a/railties/lib/rails/commands/test.rb
+++ b/railties/lib/rails/commands/test.rb
@@ -1,5 +1,9 @@
require "rails/test_unit/minitest_plugin"
-$: << File.expand_path("../../test", APP_PATH)
+if defined?(ENGINE_ROOT)
+ $: << File.expand_path('test', ENGINE_ROOT)
+else
+ $: << File.expand_path('../../test', APP_PATH)
+end
exit Minitest.run(ARGV)