autofile, a little script for big hairy test suites

So, when you woke up today, you decided to make this a better day than yesterday; you started with a big healthty breakfast, and arrived to work early.

You look at your todo list to see what needs to be done next, and full of courage take that difficult task at the middle of the list.

Even though your project's test suite has been neglected, you know the way to go is TDD/BDD. You run ./autotest only to be greeted by a tsunami of failing tests and errors.

Bummer.

So, there's a lot of failing stuff on the test suite. You cannot remove it, as it's not yours. You decide to just run the tests for your new stuff (yeah, I know it's an ugly compromise), but don't want to run it manually.

Enter autofile.rb

./autofile.rb path/to/your/lonely/test

...and every time you write to the test file, it gets run again

#!/usr/bin/ruby
@mtime=nil
while true
  current_mtime = File.stat(ARGV.first).mtime
  if current_mtime != @mtime
   puts "found change, running test"
   puts `ruby #{ARGV.first}`
   @mtime = current_mtime
 end
 sleep 0.01
end

Publicado por Maximiliano Guzman Sat, 23 May 2009 00:45:00 GMT


Comentarios

Deja un comentario

  1. Avatar
    busy over 3 years después:

    Excellent items from you, man. I’ve understand your stuff previous to and you’re simply too magnificent. I actually like what you have bought here, really like what you’re saying and the way in which you are saying it. You are making it enjoyable and you continue to take care of to keep it wise. I can’t wait to learn much more from you. That is actually a tremendous website.

  2. Avatar
    property business over 3 years después:

    Definitely imagine that that you said. Your favourite justification seemed to be on the net the easiest factor to take into accout of. I say to you, I definitely get annoyed while people consider concerns that they just do not understand about. You managed to hit the nail upon the top and also outlined out the whole thing with no need side effect , folks could take a signal.

    Will likely be back to get more. Thanks

  3. Avatar
    property business over 3 years después:

    Definitely imagine that that you said. Your favourite justification seemed to be on the net the easiest factor to take into accout of.

    I say to you, I definitely get annoyed while people consider concerns that they just do not understand about. You managed to hit the nail upon the top and also outlined out the whole thing with no need side effect , folks could take a signal. Will likely be back to get more. Thanks

  4. Avatar
    Karolyn over 3 years después:

    Have you ever thought about including a little bit more than just your articles? I mean, what you say is fundamental and everything. Nevertheless think about if you added some great pictures or video clips to give your posts more, “pop”!

    Your content is excellent but with images and video clips, this blog could definitely be one of the greatest in its niche. Wonderful blog!

  5. Avatar
    healthy diets over 3 years después:

    You can go to find a copy of the Healthy Eating Pyramid.

    Doubling this amount would have you shedding 1 pound in only 20 days.

    The plan allows an unlimited number of fruit and vegetable servings.

  6. Avatar
    site over 4 years después:

    The only thing one needs to do is to apply to multiple lenders. If you have consolidate your debt a valid phone number and email address. However, there are other advantages that apply to Consolidate Your Debt, but many individuals looking for a financial solution via traditional banks. Else you are bound to enter into a debt consolidation loan.

  7. Avatar
    Arthur over 4 years después:

    Nice Webpage, Keep up the excellent job.

    Thanks.

  8. Avatar
    Arthur over 4 years después:

    Nice Webpage, Keep up the excellent job. Thanks.

  9. Avatar
    Homepage over 4 years después:

    Thank you! This is an wonderful web site!

  10. Avatar
    Homepage over 4 years después:

    Thank you! This is an wonderful web site!

  11. Avatar
    Jamika over 4 years después:

    Yeast infections affect warm, moist areas of the body and oral Candida infections are fairly typical. The most effective fact about this treatment is that it does not allow them reoccur. Natural methods of treatment in addition to dietary changes previously noted:.

  12. Avatar
    weight loss over 4 years después:

    You’ll be able to scan your documents or have previously booked is different for both these diseases. A new site called Miss Travel advertises for attractive people that focuses on both dating and travel. But, if you’re in Benidorm, buy wine plus spirits and create the extra effort to get comfortable, which can be simply examined by officials, and repacked, without creating a mess. Take care of plus look after them.

  13. Avatar
    Stephany over 4 years después:

    Nice blog here! Also your website loads up very fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol

  14. Avatar
    Stephany over 4 years después:

    Nice blog here! Also your website loads up very fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol

  15. Avatar
    treadmill reviews over 4 years después:

    I seldom comment, however i did some searching and wound up here autofile, a little script for big hairy test suites. And I actually do have a couple of questions for you if you usually do not mind. Could it be only me or does it give the impression like some of the responses appear as if they are left by brain dead folks? :-P And, if you are posting at other sites, I’d like to keep up with anything new you have to post. Could you make a list of every one of your communal sites like your Facebook page, twitter feed, or linkedin profile?

  16. Avatar
    payday lenders over 4 years después:

    Hey! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no backup. Do you have any methods to protect against hackers?

  17. One of the many benefits of apartment living in Las Vegas is the proximity to restaurants and activities and you should easily find an apartment that is within easy and convenient commute of your work. This paper gain does not impact your financial situation until you actually sell your home and accept an offer. In other words, a home-owner must have sufficient cushion of three to five thousand dollars per year to truly own their home.

  18. Avatar
    navigate to this site over 4 years después:

    Incredible! This blog looks exactly like my old one! It’s on a completely different subject but it has pretty much the same page layout and design. Excellent choice of colors!

  19. Avatar
    trading profit over 4 years después:

    For most up-to-date news you have to visit world wide web and on web I found this site as a best site for newest updates.

  20. Avatar
    clip emusic review over 4 years después:

    Hello There. I found your blog using msn. This is an extremely well written article. I’ll make sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll certainly return.

  21. Avatar
    gunsmithing schools over 4 years después:

    It’s very effortless to find out any topic on web as compared to textbooks, as I found this article at this website.

  22. Avatar
    hay day hack over 4 years después:

    whoah this blog is excellent i love reading your articles.

    Keep up the good work! You understand, lots of people are hunting around for this info, you can aid them greatly.

  23. I just couldn’t go away your site prior to suggesting that I really loved the standard info an individual supply in your guests? Is gonna be again frequently to check up on new posts

  24. Avatar
    Woodbury MN Realtors over 4 years después:

    I do not know whether it’s just me or if perhaps everybody else encountering problems with your website. It appears as though some of the written text within your posts are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well? This may be a problem with my browser because I’ve had this happen before. Thanks

  25. Avatar
    ainol novo 10 eternal over 4 years después:

    nice post, I can see your point, something different from other guy’s, please keep updating.

  26. Avatar
    Violette over 4 years después:

    Hi to ecery one, since I am truly eager of reading this web site’s post to be updated on a regular basis. It includes fastidious material.

  27. Avatar
    slotomania hack over 4 years después:

    Way cool! Some extremely valid points! I appreciate you penning this article and the rest of the site is very good.

  28. Avatar
    eating for weight loss over 4 years después:

    Hi, its good paragraph concerning media print, we all be aware of media is a impressive source of information.

  29. Avatar
    Rochell over 4 years después:

    s entrando no site proposto neste texto que voc entender o xito de SOS Trabalho Renda. timo lugar para vver e para construir ou morar com a sua fam.

    Brazil-based Emprego Ligado helps low takings workers retrieve jobs close to residence.

  30. Avatar
    Rochell over 4 years después:

    s entrando nno site proposto neste texto que voc entender o xito de SOS Trabalho Renda. timo lugar para viver e para constrhir ou morar com a ssua fam. Brazil-based Emprego Ligado helps low takings workers retrieve jobs close to residence.

  31. Avatar
    search engine optimization over 4 years después:

    You really make it appear really easy with your presentation however I to find tis matter to be really one thing that I think I might by no means understand. It seems too complicated and very broad for me. I’m having a look forward for your subsequent post, I will attempt to get the grasp of it!

  32. Avatar
    search engine optimization over 4 years después:

    You really mame it appear really easy with your presentation however I to find thhis matter to be reallly one thing that I tthink I might by no means understand. It seems too complicated and very broad for me. I’m having a look forwarfd for your subsequent post, I will attempt to get the grasp of it!

Leave a comment