class Rails::Command::TestCommand
:nodoc:
def self.executable(*args)
def self.executable(*args) args.empty? ? Rails::TestUnitReporter.executable : super end
def all(*args)
def all(*args) perform("test/**/*_test.rb", *args) end
def functionals(*args)
def functionals(*args) perform("test/controllers", "test/mailers", "test/functional", *args) end
def generators(*args)
def generators(*args) perform("test/lib/generators", *args) end
def help(command_name = nil, *)
def help(command_name = nil, *) super if command_name == "test" say "" say self.class.class_usage end say "" Minitest.run(%w(--help)) end
def perform(*args)
def perform(*args) $LOAD_PATH << Rails::Command.root.join("test").to_s Rails::TestUnit::Runner.parse_options(args) run_prepare_task if self.args.none?(EXACT_TEST_ARGUMENT_PATTERN) Rails::TestUnit::Runner.run(args) end
def run_prepare_task
def run_prepare_task Rails::Command::RakeCommand.perform("test:prepare", [], {}) rescue UnrecognizedCommandError => error raise unless error.name == "test:prepare" end
def system(*args)
def system(*args) perform("test/system", *args) end
def units(*args)
def units(*args) perform("test/models", "test/helpers", "test/unit", *args) end