Haha, that&#39;s about the response I was expecting; I asked with some trepidation. I&#39;m just looking for a quick hack to short-circuit Merb&#39;s render method to do some view/controller isolation testing until Merb officially supports it. I can&#39;t just stub methods on @controller (like in Rails) because the controller is instantiated after calling dispatch.&nbsp;<div>
<br></div><div>I suppose I could whip up a different sort of hack to accomplish the isolation in the meantime, but now I&#39;m not so sure; apparently I&#39;m quite a noob ;)<br><br><div class="gmail_quote">On Tue, Apr 1, 2008 at 1:50 AM, Ashley Moran &lt;<a href="mailto:ashley.moran@patchspace.co.uk">ashley.moran@patchspace.co.uk</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">On 01/04/2008, <b class="gmail_sendername">Jed Hurt</b> &lt;<a href="mailto:jed.hurt@gmail.com" target="_blank">jed.hurt@gmail.com</a>&gt; wrote:</div>
<div><div class="Ih2E3d"><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Is there an easy way to stub an instance method for every new instance of a given class? I suppose I could just redefine the method, but I&#39;m wondering if the RSpec mocking framework has this built in.
</blockquote></div><div><br>Hi Jed<br><br>I hate it when other people ask this, but I can&#39;t help :)&nbsp; How come you need to do this?&nbsp; I&#39;ve always wondered what the use case for this &quot;mocking&quot; strategy is<br>
<br>
Ashley<br></div></div>
<br>_______________________________________________<br>
rspec-users mailing list<br>
<a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/rspec-users" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-users</a><br></blockquote></div><br></div>