I put the following line at the top of each of my unit tests for Watir: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
This ensures that the version of Watir that is being tested is the one that is in the same hierarchy as the unit tests (by putting its directory in the front of the load-path). You can accomplish the same thing by setting the load path at the command line. ... Unless you are using a gem. I recently started packaging Watir as a gem and i now see that, somehow, the gem mechanism prepends the gem library directories to the very front, so the gem-installed version is tested instead of the one under development. Now i need to make sure that i do a "gem uninstall watir" before running unit tests or else they are going to be testing the wrong version -- the one that has already been tested and released. This is a type II error -- the tests say they've passed but in fact they haven't actually tested what they were supposed to and could easily miss errors. Since i have many contributors to the project, i would like a more reliable mechanism to help ensure that the people running unit tests are actually testing the version under development. Any suggestions? Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
