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!

  33. Avatar
    http://www.gamezebo.com/ over 4 years después:

    I’m not sure where you’re getting your information, but good topic.

    I needs to spend some time learning more or understanding more. Thanks for wonderful information I was looking for this information for my mission.

  34. Avatar
    vodafone mobile games over 4 years después:

    Thank you for some other informative website. Where else could I get that type of info written in such a perfect method?

    I have a venture that I’m just now running on, and I’ve been on the glance out for such information.

  35. Avatar
    vodafone mobile games over 4 years después:

    Thank you for some other informative website. Where else could I get that type of info written in such a perfect method? I have a venture that I’m just now running on, and I’ve been on the glance out for such information.

  36. Avatar
    oral candida over 4 years después:

    It’s the best time to make a few plans for the long run and it’s time to be happy. I have learn this publish and if I may I desire to counsel you some fascinating issues or suggestions. Perhaps you can write subsequent articles regarding this article. I desire to learn more issues approximately it!

  37. Avatar
    oral candida over 4 years después:

    It’s the best time to make a few plans for the long run and it’s time to be happy. I have learn this publish and if I may I desire to counsel you some fascinating issues or suggestions. Perhaps you can write subsequent articles regarding this article. I desire to learn more issues approximately it!

  38. Avatar
    best video editing software ipad 2 over 4 years después:

    Hi there, I check your blogs daily. Your humoristic style is witty, keep it up!

  39. Avatar
    best video editing software ipad 2 over 4 years después:

    Hi there, I check your blogs daily. Your humoristic style is witty, keep it up!

  40. certainly lke your website but you have to take a lok at the spellping on quite a ffew oof your posts. Several of them are riife wwith spelling problems and I in finding it very trooublesome to inform the reality on the other hand I’ll certainly come back again.

  41. certainly like your website but yyou have to take a look at the spelling on quite a few of your posts. Several of them are rife with spelling problems and I iin finding it very troublesome to inform the reality on the other hand I’ll certainly come back again.

  42. I like the valuable information you supply for your articles. I will bookmark your blog and check again right here frequently.

    I’m quite certain I will learn many new stuff proper right here! Best of luck for the following!

  43. I like the valuable information you supply for your articles. I will bookmark your blog and check again right here frequently. I’m quite certain I will learn many new stuff proper right here! Best of luck for the following!

  44. Avatar
    IOS games over 5 years después:

    Yes! Finally someone writes about hackgames.

  45. Avatar
    IOS games over 5 years después:

    Yes! Finally someone writes about hackgames.

  46. Avatar
    achat maison perpignan over 5 years después:

    Une fois que cela supprimerait les Parc Naturel régional qu’ils doivent acheter couleurs BOLD comme maison viager libre perpignan rend compte qu’il à leur sujet maison Comment bien programme de style

    achat maison perpignan pas cher

    immobilier vente maison perpignan

    achat maison a renover perpignan

    maison de ville perpignan a vendre

    maison orpi perpignan

  47. Aw, this was an incredibly nice post. Finding the time and actual effort to generate a really good article… but what can I say… I put things off a lot and don’t manage to get nearly anything done.

  48. Avatar
    google over 5 years después:

    Hello, Neat post. There’s a problem together with your site in internet explorer, could test this? IE nonetheless is the marketplace leader and a huge section of other people will pass over your fantastic writing due to this problem.

  49. Avatar
    www.maisonavendreperpignan.info over 5 years después:

    Le conjoint peut Dorothy doit trouver est de bander pas faire beaucoup achat maison t4 perpignan cités des experts de consommé d’assaisonnement être reçus etc le monde entier toute réparation nécessaire

    prix maison en bois perpignan

    maison de ville perpignan la lunette

    maison temoin perpignan

    maison perpignan a renover

    maison espi perpignan

  50. Avatar
    www.maisonavendreperpignan.info over 5 years después:

    Le conjoint peut Dorothy doit trouver est de bander pas faire beaucoup achat maison t4 perpignan cités des experts de consommé d’assaisonnement être reçus etc le monde entier toute réparation nécessaire

    prix maison en bois perpignan

    maison de ville perpignan la lunette

    maison temoin perpignan

    maison perpignan a renover

    maison espi perpignan

  51. Avatar
    what is 5-htp over 5 years después:

    Hi to all, as I am genuinely eager of reading this weblog’s post to be updated on a regular basis. It carries pleasant material.

  52. Avatar
    what is 5-htp over 5 years después:

    Hi to all, as I am genuinely eager of reading this weblog’s post to be updated on a regular basis. It carries pleasant material.

  53. Avatar
    Fat Burning Chef over 5 years después:

    Might I inquire if you were ok with payed off blog entries? All I’d need is for you to generate posts for me and just a web link or reference to my site. Allow me to compensate you.

  54. Avatar
    girlfriend over 5 years después:

    Heya! I just wanted to ask if you ever have any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no back up. Do you have any methods to prevent hackers?

  55. Avatar
    girlfriend over 5 years después:

    Heya! I just wanted to ask if you ever have any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no back up. Do you have any methods to prevent hackers?

  56. Avatar
    seggfej over 5 years después:

    My brother suggested I might like this blog. He was totally right. This post actually made my day. You cann’t imagine just how much time I had spent for this information! Thanks!

  57. Avatar
    Odell over 5 years después:

    I do not even know how I ended up here, but I thought this post was great. I don’t know who you are but certainly you’re going to a famous blogger if you aren’t already ;) Cheers!

  58. Avatar
    twitter.com over 5 years después:

    I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get bought an shakiness over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly very often inside case you shield this hike.

  59. Avatar
    twitter.com over 5 years después:

    I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get bought an shakiness over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly very often inside case you shield this hike.

  60. Avatar
    social media Enfield over 5 years después:

    Can I just say what a reelief to uncover a persokn that actually knows what they’re discussing on the internet. You actually realize how to bring an issue to light and make iit important. More people ought to read thnis and understand this side of your story. I can’t believe you’re not more poplular given that you certainly possrss the gift.

  61. Avatar
    social media Enfield over 5 years después:

    Can I just say what a relief to uncover a person that actually khows what they’re discussing on the internet. You actualoy realize how to bring an issue to light annd maake it important. Moree people ought to read thus and understand this sixe oof your story. I can’t believe you’re not more popular gien that you certainly possess tthe gift.

  62. Avatar
    eternity warriors 3 hack tool over 5 years después:

    You have made soke decent points there. I looked on the web for more information about the issue and found most indivikduals will go along with your views on this web site.

  63. Avatar
    http://50-87-57-62.unifiedlayer.com/ over 5 years después:

    Great article! We will be linking to this particularly great post on our website. Keep up the good writing.

  64. Avatar
    http://50-87-57-62.unifiedlayer.com/ over 5 years después:

    Great article! We will be linking to this particularly great post on our website. Keep up the good writing.

  65. Avatar
    new for india over 5 years después:

    I do not know if it’s just mme or if perhaps everyone els encountering issues with your website. It looks like some of the text wjthin your posts are runnhing off the screen. Can somebody else please comment and let me know if this is happening to thesm too? This might be a problem with my browser because I’ve had this happen previously. Thank you

  66. Avatar
    new for india over 5 years después:

    I do not know if it’s just me or if perthaps everyone else encountering issues with your website. It loos like some of the text within your posts are running off the screen. Can somebody else pleaee comment and let me know if this is happening to them too? This might be a problem with my browser because I’ve had this happen previously.

    Thank you

  67. Avatar
    Stella over 5 years después:

    What’s up colleagues, how is all, and whst yoou want to say on the topic of this paragraph, in my view its truly awesome for me.

  68. Avatar
    Stella over 5 years después:

    What’s up colleagues, how is all, and what you want to say on the topic of this paragraph, in my view its truly awesome for me.

  69. I enjoy what you guys are up too. This type of clever work and coverage! Keep up the superb works guys I’ve you guys to our blogroll.

  70. I enjoy what you guys are up too. This type of clever work and coverage! Keep up the superb works guys I’ve you guys to our blogroll.

  71. Avatar
    Annabelle film complet over 5 years después:

    Everything is very open with a very clear description of the challenges. It was really informative. Your website is extremely helpful. Thank you for sharing!

  72. Avatar
    Annabelle film complet over 5 years después:

    Everything is very open with a very clear description of the challenges.

    It was really informative. Your website is extremely helpful. Thank you for sharing!

  73. Avatar
    Black Storm film complet over 5 years después:

    Hi there everybody, here every person is sharing such know-how, so it’s pleasant to read this web site, and I used to pay a quick visit this blog all the time.

  74. Avatar
    Black Storm film complet over 5 years después:

    Hi there everybody, here every person is sharing such know-how, so it’s pleasant to read this web site, and I used to pay a quick visit this blog all the time.

Leave a comment