Should I stub the model in Factory girl or in the spec file while testing?

前端 未结 4 2016
深忆病人
深忆病人 2021-02-18 12:39

Almost every spec file I come accross I end up writing stuff like:

  before :each do
    @cimg = Factory.build :cimg_valid
    @cimg.stub(:validate_img).and_retu         


        
4条回答
提交回复
热议问题