I have a User controller where users aren&#39;t added with the usual new/create actions.&nbsp; I&#39;m trying to set it so that it raises when &#39;new&#39; is called but it doesn&#39;t seem to be working - here&#39;s the method, test and test result.&nbsp; Can anyone see why it&#39;s not working?<br>
<br>#in controller<br>&nbsp;def new<br>&nbsp;&nbsp;&nbsp; raise &quot;Users should be added with &#39;batch_add&#39; rather than &#39;new&quot;<br>&nbsp; end<br><br>#test<br>&nbsp; describe &quot;/new&quot; do<br>&nbsp;&nbsp;&nbsp; it &quot;should raise an error when called&quot; do<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lambda{get(&#39;new&#39;)}.should raise_error(RuntimeError)<br>&nbsp;&nbsp;&nbsp; end<br>&nbsp; end<br><br>#test report<br>&#39;Admin::UserController /new should raise an error when called&#39; FAILED<br>expected RuntimeError but nothing was raised<br>
<br>