August Lilleaas
2008-Oct-14 08:09 UTC
To all TextMate users that wants to run tests with cmd + r in Rails 2.1 and above.
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: 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Russell Norris
2008-Oct-14 11:46 UTC
Re: To all TextMate users that wants to run tests with cmd + r in Rails 2.1 and above.
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 On Tue, Oct 14, 2008 at 4:09 AM, August Lilleaas <augustlilleaas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > 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: 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 > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---