import Ember from 'ember';
const { RSVP, run } = Ember;

export default function castToRSVP(promise) {
  return new RSVP.Promise((resolve, reject) => {
    promise.then(run.bind(null, resolve), run.bind(null, reject));
  });
}
