mirror of https://github.com/rails/rails
Hide rails:all from rails help
It's already listed as a Rake task.
This commit is contained in:
parent
3d52212a0c
commit
a627ef47ea
|
@ -161,7 +161,8 @@ module Rails
|
|||
end
|
||||
|
||||
def namespaced_commands
|
||||
commands.keys.map do |key|
|
||||
commands.filter_map do |key, command|
|
||||
next if command.hidden?
|
||||
if command_root_namespace.match?(/(\A|:)#{key}\z/)
|
||||
command_root_namespace
|
||||
else
|
||||
|
|
|
@ -42,6 +42,7 @@ module Rails
|
|||
end
|
||||
end
|
||||
|
||||
desc "test:all", "Runs all tests, including system tests", hide: true
|
||||
def all
|
||||
self.args = ["test/**/*_test.rb"]
|
||||
perform
|
||||
|
|
|
@ -13,6 +13,15 @@ class Rails::Command::BaseTest < ActiveSupport::TestCase
|
|||
assert_equal %w(db:system:change), Rails::Command::Db::System::ChangeCommand.printing_commands
|
||||
end
|
||||
|
||||
test "printing commands hides hidden commands" do
|
||||
class Rails::Command::HiddenCommand < Rails::Command::Base
|
||||
desc "command", "Hidden command", hide: true
|
||||
def command
|
||||
end
|
||||
end
|
||||
assert_equal [], Rails::Command::HiddenCommand.printing_commands
|
||||
end
|
||||
|
||||
test "ARGV is populated" do
|
||||
class Rails::Command::ArgvCommand < Rails::Command::Base
|
||||
def check_populated(*args)
|
||||
|
|
Loading…
Reference in New Issue