<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Here's a quick fix....</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>in mock.rb in the add method ...</DIV><DIV> def add(expectation_class, expected_from, sym, &block)</DIV><DIV> define_expected_method(sym)</DIV><DIV> expectation = expectation_class.send(:new, @name, @expectation_ordering, expected_from, sym, block_given? ? block : nil)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>@expectations << expectation</DIV><DIV> expectation</DIV><DIV> end</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Line 47 could read:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>@expectations.insert(0, expectation)</DIV><DIV>instead of </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>@expectation << expectation</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>As for a test...er spec....</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>specify "Mock expectations are overrideable" do</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>m = mock("blah")</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>m.should_not_receive(:one)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>m.should_receive(:one)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>m.one</DIV><DIV>end</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Micah Martin</DIV><DIV>8th Light, Inc.</DIV><DIV>www.8thlight.com</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR><DIV><DIV>On Oct 23, 2006, at 5:55 PM, Steven R. Baker wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">What I would like to do is define all the should_receives once in the setup using any_number_of_times.<SPAN class="Apple-converted-space"> </SPAN>This establishes a default context.<SPAN class="Apple-converted-space"> </SPAN>Then in each spec I'd like to override a specific should_receive relevant to the spec.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Without being able to override, I am force to define all the should_receives for each spec..... duplication.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Is there another solution I'm missing?</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">We need you to write a patch for this.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">If you don't feel confident doing it, I'll take a crack at it when I get home if you harass me on IM.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">srbaker0 yahoo</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:stevenrbaker@mac.com">stevenrbaker@mac.com</A> .mac</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:srbaker0@hotmail.com">srbaker0@hotmail.com</A> msn</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-Steven</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE></DIV><BR></BODY></HTML>