rake test:all
should run all tests in subdirectories of the test folder, even non-default ones.
If you want to make a rake test:api
task: Do rake -w test | grep '^rake test'
to see the files (in the railties gem) where Rails defines test tasks. In testing.rake you'll see how Rails defines tasks for the default subdirectories. Make a lib/tasks/test.rake and do the same thing for your new subdirectory:
Rails::TestTask.new('api' => "test:prepare") do |t|
t.pattern = "test/api/**/*_test.rb"
end