Because the require ‘test_helper’ at the top of all the tests is
relative now (it used to be something like require ‘…/test_helper’),
you can’t just run the file with ruby anymore. And running the file
with ruby is exactly what command + r does. Which means you can’t
easily run your tests from textmate.
The solution: rtest.rb · GitHub It’s just a shellscript. So
yeah, it doesn’t fix the textmate issue. It does however makes it
easy to run either all tests, all unit/functional/integration tests,
or a single test, from the command line. Which is sorta OK, you
probably have a terminal sitting there doin’ nothing anyway.
Usage:
- rtest unit - runs all unit
tests - rtest unit post - runs the unit test for the ‘post’
model - rtest unit post comment foo - runs those tests,
yep - rtest functional - you guessed
it! - rtest integration - blows up your computer