RESULTS
Rake::TestTask
time rake test
real 0m1.111s
user 0m0.962s
sys 0m0.133s
time rake test
real 0m1.074s
user 0m0.944s
sys 0m0.124s
My bash script
time bin/test
real 0m0.504s
user 0m0.437s
sys 0m0.066s
time bin/test
real 0m0.495s
user 0m0.431s
sys 0m0.066s
Run one test by running bin/test.sh test/user_test.rb
.
Or run the test for a file in lib bin/test.sh lib/user.rb
will run the tests in user_test.rb
.
Lastly, run all tests in the tests
directory by running bin/test.sh
.
Better yet, map this in vim.
map <Leader>tt :!bin/test.sh %<CR> " run test or test for file
map <Leader>ta :!bin/test.sh<CR> " run all tests
Also: how big is your test suite?
Also: why aren't you just using find instead of find+grep?
find test -name \*_test.rb
might be even quicker.