gma / tconsole

Testing console for Rails. Helps out with test performance and also makes it easier to run specific tests
177 stars 18 forks source link

Fail fast command #17

Closed nalanj closed 12 years ago

nalanj commented 12 years ago

Command that causes tests to stop running after the first failed test.

jivey commented 12 years ago

This would be awesome.

batasrki commented 12 years ago

Agreed

nalanj commented 12 years ago

So I need a little help. I've got the code written for this, all except how you get it to execute. Part of me is wondering if it's something where we should have a set command or something like that so you can switch back and forth between failing fast or not. I don't know that I want to have to issue a fail fast flag every time I run, because I think honestly I'd rather fail fast most of the time.

Would it be better just as a per project config option? How would you guys use fail fast?

jivey commented 12 years ago

Maybe it could work like ruby-debug? fast = on, etc. Set it once per session. I'd even default it to on.

nalanj commented 12 years ago

Sounds good - I'll go with that.

I think I'm going to do "set fast = on" or something like that so that it won't risk bumping into any other commands.

jivey commented 12 years ago

Actually ruby-debug uses a method, but you get the idea.

nalanj commented 12 years ago

Woohoo! This is done. So after talking to a few folks I decided to start out with fail fast defaulting to false. You can turn it on with set fast on and turn it back off again with set fast off. In the fairly near future you'll have the ability to set up both a global config with ~/.tconsole and a per app config with a .tconsole file in your app's folder. That will let you override the default if desired (as well as configure quite a few other things).