title: How to test if a specific method is called
body: <p>Hi there,</p>
  
  <p>I am writing unit tests for my app and I am wondering if I can test if a specific method is called.</p>
  
  <p>For instance, let's say I want to test that when the following <code>dismiss</code> method is called, the <code>reallyDismiss</code> method is also called :</p>
  
  <pre><code>- (void)dismiss
  {
     [self reallyDismiss];
  }
  </code></pre>
  
  <p>Is there something like :</p>
  
  <pre><code>- (void)testReallyDismissIsCalledWhenDismissIsCalled
  {
      [self.viewController dismiss];
      XCTAssertMethodHasBeenCalled(@"reallyDismiss");
  }
  </code></pre>
  
  <p>?</p>