title: How can I use OCMock to verify that a method is never called?
body: <p>At my day job I've been spoiled with <a href="http://mockito.googlecode.com/svn/tags/latest/javadoc/org/mockito/Mockito.html#never()" rel="noreferrer">Mockito's <code>never()</code> verification</a>, which can confirm that a mock method is never called.</p>
  
  <p>Is there some way to accomplish the same thing using Objective-C and OCMock? I've been using the code below, which works but it feels like a hack. I'm hoping there's a better way...</p>
  
  <pre><code>- (void)testSomeMethodIsNeverCalled {
      id mock = [OCMockObject mockForClass:[MyObject class]];
      [[[mock stub] andCall:@selector(fail) onObject:self] forbiddenMethod];
  
      // more test things here, which hopefully
      // never call [mock forbiddenMethod]...
  }
  
  - (void)fail {
      STFail(@"This method is forbidden!");
  }
  </code></pre>