[rspec-users] before_validation callbacks bypassed when stubbing :valid?

Ashley Moran ashley.moran at patchspace.co.uk
Tue Apr 15 18:39:30 EDT 2008

On 15 Apr 2008, at 23:05, Zubin Henner wrote:
> Item.any_instance.stubs(:valid?).returns(true)
> item = Item.new
> item.valid?

Any reason why you are not using pure mocks here?  I assume it's not  
Item you are testing, but some other model that is associated with it?



More information about the rspec-users mailing list