Hello,
Ok, I'm probably missing something obvious here, but I can't find anything in textmate to let you run your tests without going to the terminal. With everything else in there, it seems like it would be something included.
Anyway, I took a few minutes from work to do a quick hack to the bundle (my changes attached). I bound the run test command to command - option - G. If the textmate cursor is in a controller or model, it will run the associated test file. If the TM cursor is in a test file (unit or functional) it will only run the test method that the cursor is in (so that when I'm writing a test, I can run it real quick). If the cursor is outside of a test method (test_*) it will run the entire file.
I added a file to the bundle ( bin/test_helper.rb) and a command.
I also might have found a bug in the bundle. See the comments in bin/test_helper.rb
Please let me know if there already is something out there that would probably be far more thought through than this quick hack.
Thanks, -carl
On Sep 25, 2006, at 3:20 PM, Carl Lerche wrote:
Ok, I'm probably missing something obvious here, but I can't find anything in textmate to let you run your tests without going to the terminal.
When you are in a test file command-R triggers Run from the Ruby bundle and that will run all of the tests in the current file. To run just the test the caret is inside of use shift-command-R to call on Run Focused Unit Test from the same bundle. Finally, if you want to run one complete type of Rails tests (unit, functional, or integration) or all of the tests, you can trigger the Ruby bundles' Run Rake Task with control-shift-R.
The only thing not covered is running the test from a model or controller file, as your script supports. In practice this hasn't really affected me since I have both the file I'm working on and the test file open when building a site. Perhaps others might enjoy this feature though.
James Edward Gray II
On Sep 26, 2006, at 9:00 AM, James Edward Gray II wrote:
The only thing not covered is running the test from a model or controller file, as your script supports. In practice this hasn't really affected me since I have both the file I'm working on and the test file open when building a site. Perhaps others might enjoy this feature though.
i use zentest's autotest (modified to do ANSi colored output) I'd love to run all that stuff inside a TM output window and get the txmt links. I just need a way for zentest to trigger the command. i know there's a support ticket request for commanding textmate from the terminal.
thomas Aylott — subtleGradient — CrazyEgg
On Sep 26, 2006, at 11:25 AM, thomas Aylott wrote:
i use zentest's autotest (modified to do ANSi colored output) I'd love to run all that stuff inside a TM output window and get the txmt links.
Could you have a TM command kick off autotest and then monitor it for changes via the handler parameter to TextMate.system()?
James Edward Gray II
On Sep 26, 2006, at 1:10 PM, James Edward Gray II wrote:
On Sep 26, 2006, at 11:25 AM, thomas Aylott wrote:
i use zentest's autotest (modified to do ANSi colored output) I'd love to run all that stuff inside a TM output window and get the txmt links.
Could you have a TM command kick off autotest and then monitor it for changes via the handler parameter to TextMate.system()?
James Edward Gray II
Hmm, interesting. I'll have to check that out.
thomas Aylott — subtleGradient — CrazyEgg
The only thing not covered is running the test from a model or controller file, as your script supports. In practice this hasn't really affected me since I have both the file I'm working on and the test file open when building a site. Perhaps others might enjoy this feature though.
And switching to the test (or any other related file) is just a ⌥⇧⌘↓ away!
- Rod
Well... my tweaks does it quicker :P Now I just have to screenscrape the test output to pretty HTML!
On 9/27/06, Rod Knowlton rod.knowlton@gmail.com wrote:
The only thing not covered is running the test from a model or controller file, as your script supports. In practice this hasn't really affected me since I have both the file I'm working on and the test file open when building a site. Perhaps others might enjoy this feature though.
And switching to the test (or any other related file) is just a ⌥⇧⌘↓ away!
- Rod
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate