El Wed, 09 de Dec de 2009, a las 10:31:16AM -0300, Ricardo Markiewicz dijo: > Estoy teniendo un problemita medio raro con rspec, a ver si a alguien le paso. > > Cuando hago rake spec, tengo un test que falla : > 'Coupon should not let the user highlight a coupon if there is no > highlighted_image' FAILED > expected valid? to return false, got true > ./spec/models/coupon_spec.rb:26: > > Entonces fixeo algo que creí que estaba mal y me fije que pase ese test : > ./script/spec --color ./spec/models/coupon_spec.rb:26 > . > > Finished in 0.191306 seconds > > 1 example, 0 failures > > Yeah, "el sistema funciona" (TM), pero cuando corro rake spec, este > test sigue fallando (es el unico que falla) : > it "should not let the user highlight a coupon if there is no > highlighted_image" do > @coupon2 = Factory.build(:coupon, :highlighted => true, > :highlighted_image => nil) > @coupon2.should_not be_valid > end > > El validator es el de paperclip : > validates_attachment_presence :highlighted_image, :if => :"highlighted?", > :message => "Debe subir una imagen de > 178x108 para poder destacar el Cupon" > > Y si uno prueba la aplicacion a mano hace lo que debe, pero rake spec > sigue fallando. Alguna idea ? rake spec usa la misma version de rspec que cuando corrés script/spec ?
> > -- > -- > Ricardo Markiewicz > http://www.gazer.com.ar/ > http://www.voyovoy.com/ - ¿Qué hay para hacer? > _______________________________________________ > Ruby mailing list > [email protected] > http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar -- _______________________________________________ Ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
