I ran into a similar situation recently and the workaround that I use is 
to run a small batch file
before running all unit tests. The batch file has just two lines in it:

call gem build wet-web.gemspec
call gem install wet-web*.gem

pause

This ensures that the installed machine on my test machine is the 
_development_ version and not the
release version.

Raghu

Bret Pettichord wrote:

>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
>
>  
>


-- 
Qantom Software

http://www.qantom.com
Ph : 91-80-26799269 Xtn. 125
sip : [EMAIL PROTECTED]
--

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to