Monday, September 01, 2008

When autotest fails

Our application uses namespaces quite extensively. While using RSpec this has a nasty side effect - it breaks autotest triggering rspec namespaced controllers bug

Due to false positives autotest became unusable. Too bad as I miss it's lightning-fast feedback. The only thing that remains is to run the tests myself.

While I do that before each commit, running them in separation takes quite some time - loading the whole environment takes precious seconds. This hurts especially when run from TextMate

RSpec provides a solution for this long test startup issue. You can run spec_server and tell TextMate to use it when running tests.

Open your console and from the project's directory start:

./script/spec_server

Now we have to tell TextMate to use this server when running RSpec examples. Open TextMate preferences and in Advanced tab, Shell Variables, add new variable called TM_RSPEC_OPTS with a value -X

Advanced
Uploaded with plasq's Skitch!

This should significantly speed up running tests

0 comments: