TextMate Focused Unit Tests

Posted by Jake Good
on Nov 22, 06

So you’re using TextMate on Mac OS X… and you’re in a Ruby on Rails / Ruby project…



Before the infamous “Halloween Update” you were running your Focused Unit Tests quite easily within TextMate by hitting CMD + SHIFT + R.



A nice window pops up, tells you what the results of that particular test case was… nice.



Then the update came… you tried the same thing again… and you get this:






1
2
3
4
5
6
7
8

RubyMate r6189 running Ruby r1.8.5 (/opt/local/bin/ruby)
>>> my_controller_test.rb

that’s nice
this is my important stuff
<strong>bad!</strong>
I am <at> the exit!


Boo! This sucks! What the heck is this? Well… using my handy dandy grep, I searched my rails project and could not find any remnants of the string… “I am the exit”.



So onto TextMate / RubyMate…



/Applications/TextMate.app/$ grep ‘this is my important stuff’ -r *



Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/RubyMate/test.rb:at_exit { puts “I am the exit!” }



Bingo!



Seems as though test.rb is getting picked up into path and is being executed along with your focused unit test…



Easy fix, varies with mileage and I’m not responsible for your actions
/Applications/TextMate.app/$ rm Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/RubyMate/test.rb



The real fix is coming… I’ve contacted the core team for RubyMate and let them know what’s going on…



Good thing that’s over… I def missed my focused unit tests…

Comments

Leave a response

  1. your momNov 22 06 @ 03:03AM

    stop interrupting my conversations and asking stupid questions. you’re such a tool.

  2. Jake GoodNov 22 06 @ 03:03AM

    my mom! you’re back! :) i thought you’d never come back and comment…

Comment