Class: Rails::Command::TestCommand

Inherits:
Base show all
Defined in:
railties/lib/rails/commands/test/test_command.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

banner, base_name, class_usage, command_name, default_command_root, desc, engine?, exit_on_failure?, help, hide_command!, inherited, namespace, perform, printing_commands, usage_path

Methods included from Actions

#boot_application!, #load_environment_config!, #load_generators, #load_tasks, #require_application!, #set_application_directory!

Class Method Details

.executable(*args) ⇒ Object



11
12
13
# File 'railties/lib/rails/commands/test/test_command.rb', line 11

def self.executable(*args)
  args.empty? ? Rails::TestUnitReporter.executable : super
end

Instance Method Details

#all(*args) ⇒ Object



45
46
47
# File 'railties/lib/rails/commands/test/test_command.rb', line 45

def all(*args)
  perform("test/**/*_test.rb", *args)
end

#functionals(*args) ⇒ Object



50
51
52
# File 'railties/lib/rails/commands/test/test_command.rb', line 50

def functionals(*args)
  perform("test/controllers", "test/mailers", "test/functional", *args)
end

#generators(*args) ⇒ Object



65
66
67
# File 'railties/lib/rails/commands/test/test_command.rb', line 65

def generators(*args)
  perform("test/lib/generators", *args)
end

#perform(*args) ⇒ Object



28
29
30
31
32
33
34
# File 'railties/lib/rails/commands/test/test_command.rb', line 28

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

#system(*args) ⇒ Object



60
61
62
# File 'railties/lib/rails/commands/test/test_command.rb', line 60

def system(*args)
  perform("test/system", *args)
end

#units(*args) ⇒ Object



55
56
57
# File 'railties/lib/rails/commands/test/test_command.rb', line 55

def units(*args)
  perform("test/models", "test/helpers", "test/unit", *args)
end