Class: Rails::Commands::Tester

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/commands/tester.rb

Instance Method Summary collapse

Instance Method Details

#test(what = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rails/commands/tester.rb', line 6

def test(what = nil)
  case what
  when NilClass
    print_test_usage
  when "all"
    run "test/**/**/*_test.rb"
  when /^[^\/]+$/ # models
    run "test/#{what}/**/*_test.rb"
  when /[\/]+/ # models/person
    run "test/#{what}_test.rb"
  end

  "Completed"
end