[rspec-users] Testing discovered a problem in my code
matthew.krom at gmail.com
Thu Apr 16 08:43:38 EDT 2009
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 <lists at ruby-forum.com>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
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users