define('ember-test-helpers/legacy-0-6-x/ext/rsvp', ['exports'], function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports._setupPromiseListeners = _setupPromiseListeners;
exports._teardownPromiseListeners = _teardownPromiseListeners;
var originalAsync = void 0;
/**
Configures `RSVP` to resolve promises on the run-loop's action queue. This is
done by Ember internally since Ember 1.7 and it is only needed to
provide a consistent testing experience for users of Ember < 1.7.
@private
*/
function _setupPromiseListeners() {
originalAsync = Ember.RSVP.configure('async');
Ember.RSVP.configure('async', function (callback, promise) {
Ember.run.backburner.schedule('actions', function () {
callback(promise);
});
});
}
/**
Resets `RSVP`'s `async` to its prior value.
@private
*/
function _teardownPromiseListeners() {
Ember.RSVP.configure('async', originalAsync);
}
});