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