title: How to mock ViewController.willEnter in Ionic 2?
body: <p>I use <code>viewCtrl.willEnter</code> to generate a Observable that I call <code>.subscribe</code> on in a <code>Component</code>. Currently, the tests are throwing a <code>viewCtrl.willEnter.subscribe</code> is not a valid function error. This is because in Ionic 2, I have to mock the viewController, and I have not successfully done so for this particular method.</p>
  
  <p>This is what I got so far. </p>
  
  <pre><code>public willEnter(): Observable&lt;boolean&gt; {
      let observable = Observable.create(function (observer) {
      observer.onNext(true);
      observer.onCompleted();
      });
  
      return observable
    };
  </code></pre>