/*global define*/
/* jshint indent:2 */

define('mixins', [], function () {
  'use strict';

  var buildUrl = function(components, firstSlash) {
    var url = components.join('/');
    if (firstSlash) {
      return '/' + url;
    }
    return url;
  };

  var buildPromise = function(output) {
    return {
      then: function(cb) {
        return buildPromise(cb(output));
      }
    };
  };

  return {
    buildUrl: buildUrl,
    buildPromise: buildPromise
  };
});

@@ -324,24 +324,131 @@
 ction(cb) %7B%0A
+        var result = cb(output);%0A%0A        if (result && result.then) %7B%0A          return result;%0A        %7D%0A%0A
         retu
@@ -463,26 +463,22 @@
 Promise(
-cb(output)
+result
 );%0A     

Fix tests