diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-02-23 18:30:49 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-02-23 18:30:49 +0100 |
commit | 1c897f500e0ec995c3ae0685966813ac2811bfb7 (patch) | |
tree | 3f1115bf3213e2f7f59fed8c905f8a2f11572cbd /railties/lib | |
parent | fbee4e3ce37674eb928298490a35d3dfd1921e67 (diff) | |
download | rails-1c897f500e0ec995c3ae0685966813ac2811bfb7.tar.gz rails-1c897f500e0ec995c3ae0685966813ac2811bfb7.tar.bz2 rails-1c897f500e0ec995c3ae0685966813ac2811bfb7.zip |
Fix test:units not hitting rake task.
By splitting the namespace test:units on :, we'd find our TestCommand,
which knew nothing of a units method.
So check that a found command also includes the command name we're trying
to call.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/command.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb index 73f9684ca4..d8549db62e 100644 --- a/railties/lib/rails/command.rb +++ b/railties/lib/rails/command.rb @@ -39,7 +39,8 @@ module Rails command_name = "help" if command_name.blank? || HELP_MAPPINGS.include?(command_name) namespace = "version" if %w( -v --version ).include?(command_name) - if command = find_by_namespace(namespace, command_name) + command = find_by_namespace(namespace, command_name) + if command && command.all_commands[command_name] command.perform(command_name, args, config) else find_by_namespace("rake").perform(full_namespace, args, config) |