Hi folks.<br><br>I'm trying to work out how to verify that a controller has called a render:update block similar to:<br> render :update do |page|<br> page.replace_html 'edit', :partial => 'form', :locals => { :operation => 'edit', :submit_button_value => 'Update' }
<br> end<br clear="all"><br>We used to test this with something like:<br> response.should render_template("_form")<br> response.should have_rjs(:replace_html, 'edit')<br>... which works, but doesn't validate the parameters.
<br><br>Then I discovered we could do:<br> controller.expect_render(:partial => 'form', :locals => { :operation => 'edit', :submit_button_value => 'Update' })<br>This will check the parameters, but doesn't confirm *how* the response was rendered - there is no checking of ':replace_html', and I'm not sure how to check for any other rjs calls that don't render a partial. And, as it is mocking out the call to "render", "should have_rjs" no longer works.
<br><br>Any thoughts? Anyone got a suggestion for a way to check both the parameters, and the kind of render:update call made?<br><br>Thanks.<br><br>- Korny<br><br>-- <br>Kornelis Sietsma korny at my surname dot com<br>
<br>