# To all TextMate users that wants to run tests with cmd + r in Rails 	2.1 and above.

**URL:** <https://discuss.rubyonrails.org/t/to-all-textmate-users-that-wants-to-run-tests-with-cmd-r-in-rails-2-1-and-above/35336>\
**Category:** rubyonrails-talk\
**Created:** [October 14, 2008, 8:09am UTC](https://discuss.rubyonrails.org/t/to-all-textmate-users-that-wants-to-run-tests-with-cmd-r-in-rails-2-1-and-above/35336 "2008-10-14T08:09:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![August\_Lilleaas](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@August\_Lilleaas](https://discuss.rubyonrails.org/u/August_Lilleaas)\
**Post date:** [October 14, 2008, 8:09am UTC](https://discuss.rubyonrails.org/t/to-all-textmate-users-that-wants-to-run-tests-with-cmd-r-in-rails-2-1-and-above/35336/1 "2008-10-14T08:09:46Z")

</div>

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](http://gist.github.com/16519) 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

---

<div class="post-metadata">

**Author:** ![Russell\_Norris](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@Russell\_Norris](https://discuss.rubyonrails.org/u/Russell_Norris)\
**Post date:** [October 14, 2008, 11:46am UTC](https://discuss.rubyonrails.org/t/to-all-textmate-users-that-wants-to-run-tests-with-cmd-r-in-rails-2-1-and-above/35336/2 "2008-10-14T11:46:00Z")

</div>

or you could be running autotest and know that yr tests are passing without 1. having to press any additional keystrokes, 2. without having to _remember_ to press any additional keystrokes, 3. wondering if that fix you just implemented and tested broke anything in any other tests.

my name is Russell Norris and i agree with this message.

RSL
