emberjs/ember.js — pull request #4435 by rjackson (2014-02-26 04:59:13+00:00)
Title: [BUGFIX beta] Move AJAX listeners into Ember.setupForTesting.

Currently, if AJAX is being performed in an initializer the standard `wait` helper will not be aware of it since the `Test.pendingAjaxRequests` is initialized to 0 upon `App.injectTestHelpers`. This is AFTER the application initializers have run.

This changes to allow calling `Ember.setupForTesting` before creating your application instance (for environments like EAK that create a new application for each test), and is completely backwards compatible.