Is it possible to write a rake task that will run a single specified Unit test or a single specified Functional test?
You can run a particular test method from the test case by using the -n switch with the test method name.
$ ruby -Itest test/unit/post_test.rb -n test_the_truth
Loaded suite unit/post_test
Started
.
Finished in 0.023513 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
http://guides.rubyonrails.org/testing.html
It means your rake task will look like
task :tester => :environment do
`cd #{Rails.root} && ruby -Itest test/unit/post_test.rb -n test_the_truth`
end