From: ara.t.howard@... Date: 2007-03-30T01:51:25+09:00 Subject: Re: passing data to tests with test/unit On Fri, 30 Mar 2007, Matt Berney wrote: > Thanks Brian, > > This would work ok if there was only one test method and only 3 types. > Now let's say that I want to use this test technique multiple times, > with multiple test methods. And, the data input is over 100 items. > Duplicating this structure 100 times doesn't seem tenable. > > What I am really looking for is a data-driven test method, such that I > can use the same test case and pass it different data. However, for > test execution and measurement purposes, it is preferable to record > these as separate tests. > def setup TEST_DATA = YAML.load(IO.read(ENV['TEST_DATA'])) # TEST_DATA is a filename for # yaml data end TEST_DATA=a.yml ruby test/a.rb -a -- be kind whenever possible... it is always possible. - the dalai lama