The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
rake passes but autotest fails?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ryan Davis

Posts: 651
Nickname: zenspider
Registered: Oct, 2004

Ryan Davis is a ruby nerd.
rake passes but autotest fails? Posted: Nov 6, 2006 11:39 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Ryan Davis.
Original Post: rake passes but autotest fails?
Feed Title: Polishing Ruby
Feed URL: http://blog.zenspider.com/index.rdf
Feed Description: Musings on Ruby and the Ruby Community...
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Ryan Davis
Latest Posts From Polishing Ruby

Advertisement

Fix Your Dependencies!!!

Yipstar finally provided me a producible test case for the situation a number of people have told me about but couldn't boil down. The whole thing is so dead simple. That is why I think I missed it this whole time:

rake:

ruby -e "require 'test_a'; require 'test_b'; ..."

autotest:

ruby -e "...; require 'test_b'; require 'test_a'"

If your tests break by simply changing the order in which they load then you have dependency issues! Every single test file you have should be able to run independently of all others (which is a damn powerful tool to have in combination with -n "/regex/").

(As an aside, I worked with yipstar and we got his tests all patched up and autotest still had a problem because it uses load, not require... no clue... Eric and I are going to look into that tomorrow)

Some of you will want me to "fix autotest"... BAH! Autotest isn't broken! Your tests are! I will add another task to Hoe that will help point out all test files that don't pass independently so you can go and patch up your tests.

% rake test_deps
Dependency Issues: test/test_a.rb
Dependency Issues: test/test_c.rb
...

We should have a release later today for both ZenTest and Hoe with new testy goodness.

Read: rake passes but autotest fails?

Topic: Object Serialization Previous Topic   Next Topic Topic: The Power of Tests

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use