diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-07-12 17:51:35 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-07-12 18:29:31 +0900 |
commit | 824246f66b21c89d4a646a3cb73e46134d97469d (patch) | |
tree | 5cc0d38a225055a4951159a6fdf907502eed11d6 /railties/lib/rails/engine | |
parent | e0a7e7b0ee3204fdc5ef8580450582bd55340d3e (diff) | |
download | rails-824246f66b21c89d4a646a3cb73e46134d97469d.tar.gz rails-824246f66b21c89d4a646a3cb73e46134d97469d.tar.bz2 rails-824246f66b21c89d4a646a3cb73e46134d97469d.zip |
make test runner work correctly inside engine
Diffstat (limited to 'railties/lib/rails/engine')
-rw-r--r-- | railties/lib/rails/engine/commands.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/engine/commands.rb b/railties/lib/rails/engine/commands.rb index f39f926109..a6d87b78e4 100644 --- a/railties/lib/rails/engine/commands.rb +++ b/railties/lib/rails/engine/commands.rb @@ -2,7 +2,8 @@ ARGV << '--help' if ARGV.empty? aliases = { "g" => "generate", - "d" => "destroy" + "d" => "destroy", + "t" => "test" } command = ARGV.shift @@ -12,7 +13,7 @@ require ENGINE_PATH engine = ::Rails::Engine.find(ENGINE_ROOT) case command -when 'generate', 'destroy' +when 'generate', 'destroy', 'test' require 'rails/generators' Rails::Generators.namespace = engine.railtie_namespace engine.load_generators @@ -30,6 +31,7 @@ Usage: rails COMMAND [ARGS] The common Rails commands available for engines are: generate Generate new code (short-cut alias: "g") destroy Undo code generated with "generate" (short-cut alias: "d") + test Run tests (short-cut alias: "t") All commands can be run with -h for more information. |