[rspec-users] rspec render :update

Reggie Mr. lists at ruby-forum.com
Fri Jul 11 13:04:00 EDT 2008

Hi all,

I'm having trouble with rspec 1.1.4 and rjs

In the controller:
render :update do |page|
        page << 'added text'

render :update do |page|
        page.replace_html :divid :partial => 'apartial'


response.should have_rjs   #this should be successful for any rjs
request; but fails

response.should have_rjs(:replace_html)  #no luck

I have tried mocking the page object, but that also fails.

@page = mock('page)

What's the best practice to validate rjs responses?

Thanks in advance
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list