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
I haven't profiled anything, but this looks like it's really just a comparison of (gnu?) find+grep vs Rake's FileList (which I'm not a fan of, for the record).
Is there any chance you can strip out the actual test run and compare those?
I'd also love to see a comparison against my test task in Hoe. It uses plain Dir.glob, not FileTask. (thinking about it... I could probably make it even faster since I already have a manifest).
Prolly just benchmarking the 3 discovery mechanisms would be illuminating.