title: When trigged action, mockNavigationController return current viewController, not pushed
body: <p>I learning TTD, and have problem with navigation controller in Unit-testing.
      When I'm trying to push Detail View Controller through navigation stack (pushViewController(ViewController, animated:) ) with my mock controller, in test push function not perform (its perform only first time, when navigationController initialise).
  On simulation iPhone, app work correctly.
      In code mockNavigationController have value pushedVC, that changes when pushViewController perform.
      When user tap on cell, dataProvider (delegate and dataSource for tableCell) post notification to ViewController (sut), that implements showDetails method.</p>
  
  <p>I'd try take topViewController from navigationController:
   sut.navigationController?.topViewController - it's return sut ViewController.
  Try not initialise navigationController in test. sut.navigationController?.topViewController - it's return nil.</p>
  
  <p>This beginning of XCTestCase</p>
  
  <pre class="lang-swift prettyprint-override"><code>var sut: EatersListViewController!
  
      override func setUp() {
          super.setUp()
  
          let storyBoard = UIStoryboard(name: "Main", bundle: nil)
          let vc = storyBoard.instantiateViewController(withIdentifier: String(describing: EatersListViewController.self))
          sut = vc as? EatersListViewController
  
          sut.loadViewIfNeeded()
      }
  </code></pre>
  
  <p>This test function</p>
  
  <pre class="lang-swift prettyprint-override"><code>func testSelectedRowPushedDetailVC() {
          let mockNavigationController = MockNavigationController(rootViewController: sut)
          UIApplication.shared.keyWindow?.rootViewController = mockNavigationController
  
          let eater1 = Eater(name: "Foo")
          sut.dataProvider.manager!.addEater(eater: eater1)
  
          sut.loadViewIfNeeded()
  
          sut.tableView.delegate?.tableView?(sut.tableView, didSelectRowAt: IndexPath(row: 0, section: 0))
  
          guard let detailEaterVC = mockNavigationController.pushedVC as? DetailEaterViewController else {
              XCTFail()
              return
          }
          detailEaterVC.loadViewIfNeeded()
  
          XCTAssertNotNil(detailEaterVC.eaterNameLabel)
          XCTAssertEqual(detailEaterVC.eaterData, eater1)
  }
  </code></pre>
  
  <p>This function from ViewController </p>
  
  <pre class="lang-swift prettyprint-override"><code>@objc func showDetails(withNotification notification: Notification) {
          guard
              let userInfo = notification.userInfo,
              let eater = userInfo["eater"] as? Eater,
              let detailEaterVC = storyboard?.instantiateViewController(withIdentifier: String(describing: DetailEaterViewController.self)) as? DetailEaterViewController else { return }
          detailEaterVC.eaterData = eater
          navigationController?.pushViewController(detailEaterVC, animated: true)
  }
  </code></pre>
  
  <p>And MockNavigationController</p>
  
  <pre class="lang-swift prettyprint-override"><code>extension EatersListViewControllerTests {
      class MockNavigationController: UINavigationController {
  
          var pushedVC: UIViewController?
  
          override func pushViewController(_ viewController: UIViewController, animated: Bool) {
              pushedVC = viewController
              super.pushViewController(viewController, animated: animated)
          }
      }
  }
  </code></pre>
  
  <p>I'd expected that XCTAssert work correct, but every time test failed on XCTFail() line. I think somewhere error, and don't know here.</p>
  
  <pre class="lang-swift prettyprint-override"><code>XCTAssertNotNil(detailEaterVC.eaterNameLabel)
  XCTAssertEqual(detailEaterVC.eaterData, eater1)
  </code></pre>
  
  <p>Need help with code, where I wrong. Thanks for reading.</p>