[Uw-ruby] autotest qwirky?

Ryan Davis ryand-uwruby at zenspider.com
Wed Nov 21 16:45:43 PST 2007


On Nov 18, 2007, at 20:51 , Ryan Ward wrote:

>  Both homework files open in my editor (test_weekX.rb and weekX.rb).
> I have terminal running with autotest in the background. I make a
> change to weekX.rb hit save, then watch autotest detect the change.
>
> In this case  #2 kept failing over and over and I couldn't figure out
> why.  Could swear my code looked ok. I did some more muckin around
> with my code, saving again, then decided to revert back to my original
> code and then saving once more. All of a sudden the test started
> passing with the exact same code when the test failed.

Autotest isn't quirky, it is very very mechanical.

> 2) Failure:
> test_find_all_evens(TestWeek4) [test/test_week4.rb:44]:
> --- /var/folders/T3/T3JeDhXpGXSZWZV0lFaRTE+++TI/-Tmp-/expect.4006.0	
> 2007-11-18 20:18:09.000000000 -0800
> +++ /var/folders/T3/T3JeDhXpGXSZWZV0lFaRTE+++TI/-Tmp-/butwas.4006.0	
> 2007-11-18 20:18:09.000000000 -0800
> @@ -1 +1 @@
> -<[2, 4, 6, 8]>
> +<nil>
>
>
> I have noticed this in many times now, in previous weeks home work as
> well. Is there some sort of caching happening in autotest, or maybe
> this is Textmate doing something weird with saves? Or some user error?

Generally what I've found is people write tests that don't have their  
dependencies set up correctly or depend on various load orders.  
Autotest always outputs it's command line so you can see what it is  
running and how. Grab that and try to reproduce your problem w/o  
autotest.

http://blog.zenspider.com/archives/2006/11/rake_passes_but_autotest_fails.html



More information about the Uw-ruby mailing list