From: David Chelimsky Date: 2007-01-26T02:37:15+09:00 Subject: Re: Class.new ? On 1/25/07, Warren Seltzer wrote: > Thanks, I see how to make it work, but I don't see need to ever do it... I stub #new all the time when testing Rails applications: thing = mock("thing") Thing.stub!(:new).and_return(thing) This is extraordinarily useful when trying to isolate components for testing, and I can only do this if the mock framework can override new (which it does in this case).