[rspec-users] Problems with view spec and mocking will_paginate

Gaston Ramos ramos.gaston at gmail.com
Fri Jun 6 17:48:41 EDT 2008

Hi all, I have some failures that not I don't understand

this the pastie with index.erb.html

and this is the pastie for view's spec:

and the failure:

ActionView::TemplateError in '/posts/index.html.erb should render list
of posts'
undefined method `count' for [#<Comment:0x..fdb6535be @name="Comment_1001">]:Array

I tried this: Array.stub!(:count).and_return(1)
but didn't work.

Can somebody help me?


"Es imposible afinar un lápiz con una cuchilla desafilada. Es igualmente inútil tratar de hacerlo con diez."
  (Edsger Dijkstra)

Gastón Ramos
GNU/Linux Counter user #450312

More information about the rspec-users mailing list