I missed that; sorry. When code uses class-cached data for performance, I've developed a testing pattern that explicitly clears class-cached data as part of the test data setup. It does require careful attention. I'd be interested in what others do!
On Thu, Apr 16, 2009 at 8:20 AM, Fernando Perez <[email protected]>wrote: > Matthew Krom wrote: > > Your single test may be relying on database data that is set up (and > The tests don't hit the database. Only one previous test hits the same > method and forces the class to set this instance variable. > > But I thing that I really have a flaw in my code, as this class instance > variable will be set once by the process and will keep the same value as > long as the process is running. I should probably rewrite it to an > instance variable. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
