title: Ember Integration Testing, How to use wait to build a custom Helper?
body: <p>I don't understand how to use the wait helper provided by the Ember.Test package to build our own helpers. The few that I understood, is that we must return systematically "wait(...)" at the end of our helpers.
  But how report that my asynchronous operation is done ? We can pass a parameter to the wait method, so I thought that I could pass it a promise, and resolve the promise when my asynchronous operation is done ... But it doesn't work :D</p>
  
  <p>To illustrate my idea I did a JSBIN with an example : <a href="http://jsbin.com/OxeniTO/30/" rel="nofollow">http://jsbin.com/OxeniTO/30/</a></p>
  
  <pre><code>App = Em.Application.create({
    rootElement:"#ember-app"
  });
  
  App.setupForTesting();
  App.injectTestHelpers();
  App.advanceReadiness();
  
  
  test('Wait 1000ms and fail',function(){
    visit('/').then(function(){
      var promise = $.Deferred();
  
      setTimeout(function(){
        ok(false, "Assertion failed");
        promise.resolve();
      }, 1000);
  
      ok(true, "Assert passed");
  
      return wait(promise);
    });
  });
  </code></pre>
  
  <p>In this case, the Ember.Test.Adapter for Qunit doesn't wait the promise resolution.</p>