From: ChrisKaelin Date: 2007-04-14T01:10:24+09:00 Subject: unit-test ARGV problem (only 1 of 3 tests is using it) I have 3 tests using the following setup routine, that is faking command line arguments via ARGV. Only one of my 3 test routines seems to be actually using the ARGV defined here (but the @run1 seems to be initialized, so I know at least, the setup routine is called by each test). Am I missing anything? I thought the setup routine is called for every test? def setup # faking commandline arguments first # no space here or the space will be # part of the filenames ;-) if RUBY_PLATFORM =~ /mswin32/ #ARGV[1] = "-h" ARGV[1] = "-ltestlogfile" ARGV[2] = "-cdefault_config.yml" ARGV[3] = "-pC:\\TEMP" ARGV[4] = "-L4" ARGV[5] = "-v" else ARGV[1] = "-ltestlogfile" ARGV[2] = "-cdefault_config.yml" ARGV[3] = "-p\/tmp" end @run1 = TheScript.new @run1.set_vars end