I am having trouble working out why a promise is being fulfilled when the documentation says it should be rejected.
Open http://jsbin.com/orifok/5/edit and click the go button, and it alerts "ok" when it should alert "fail".
Replace when221.all...
with deferred2.promise.then(stepFulfilled, stepRejected);
and the rejection occurs.
I did make a modification to the when.js code to make the when221 variable global, rather than needing a dependency upon the require.js library (see http://pastebin.com/J8wCqjWM compared with original https://github.com/cujojs/when/blob/2.2.1/when.js).
when.all() documentatation says: If any of the promises is rejected, the returned promise will be rejected with the rejection reason of the first promise that was rejected - see https://github.com/cujojs/when/blob/master/docs/api.md#whenall