text: /**
   * @license jsmock 0.3.1 Copyright (c) 2011-2014, chris.scott@factmint.com
   * MIT license.
   * see: http://github.com/chrismichaelscott/jsmock -> LICENSE.txt for details
   * Includes https://github.com/jrburke/almond (MIT)
   */
  
  (function(e,t){typeof define=="function"&&define.amd?define([],t):e.jsmock=t()})(this,function(){var e,t,n;return function(r){function v(e,t){return h.call(e,t)}function m(e,t){var n,r,i,s,o,u,a,f,c,h,p,v=t&&t.split("/"),m=l.map,g=m&&m["*"]||{};if(e&&e.charAt(0)===".")if(t){v=v.slice(0,v.length-1),e=e.split("/"),o=e.length-1,l.nodeIdCompat&&d.test(e[o])&&(e[o]=e[o].replace(d,"")),e=v.concat(e);for(c=0;c<e.length;c+=1){p=e[c];if(p===".")e.splice(c,1),c-=1;else if(p===".."){if(c===1&&(e[2]===".."||e[0]===".."))break;c>0&&(e.splice(c-1,2),c-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((v||g)&&m){n=e.split("/");for(c=n.length;c>0;c-=1){r=n.slice(0,c).join("/");if(v)for(h=v.length;h>0;h-=1){i=m[v.slice(0,h).join("/")];if(i){i=i[r];if(i){s=i,u=c;break}}}if(s)break;!a&&g&&g[r]&&(a=g[r],f=c)}!s&&a&&(s=a,u=f),s&&(n.splice(0,u,s),e=n.join("/"))}return e}function g(e,t){return function(){var n=p.call(arguments,0);return typeof n[0]!="string"&&n.length===1&&n.push(null),s.apply(r,n.concat([e,t]))}}function y(e){return function(t){return m(t,e)}}function b(e){return function(t){a[e]=t}}function w(e){if(v(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!v(a,e)&&!v(c,e))throw new Error("No "+e);return a[e]}function E(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice,d=/\.js$/;o=function(e,t){var n,r=E(e),i=r[0];return e=r[1],i&&(i=m(i,t),n=w(i)),i?n&&n.normalize?e=n.normalize(e,y(t)):e=m(e,t):(e=m(e,t),r=E(e),i=r[0],e=r[1],i&&(n=w(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return g(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:S(e)}}},i=function(e,t,n,i){var s,l,h,p,d,m=[],y=typeof n,E;i=i||e;if(y==="undefined"||y==="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(d=0;d<t.length;d+=1){p=o(t[d],i),l=p.f;if(l==="require")m[d]=u.require(e);else if(l==="exports")m[d]=u.exports(e),E=!0;else if(l==="module")s=m[d]=u.module(e);else if(v(a,l)||v(f,l)||v(c,l))m[d]=w(l);else{if(!p.p)throw new Error(e+" missing "+l);p.p.load(p.n,g(i,!0),b(l),{}),m[d]=a[l]}}h=n?n.apply(a[e],m):undefined;if(e)if(s&&s.exports!==r&&s.exports!==a[e])a[e]=s.exports;else if(h!==r||!E)a[e]=h}else e&&(a[e]=n)},e=t=s=function(e,t,n,a,f){if(typeof e=="string")return u[e]?u[e](t):w(o(e,t).f);if(!e.splice){l=e,l.deps&&s(l.deps,l.callback);if(!t)return;t.splice?(e=t,t=n,n=null):e=r}return t=t||function(){},typeof n=="function"&&(n=a,a=f),a?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),s},s.config=function(e){return s(e)},e._defined=a,n=function(e,t,n){t.splice||(n=t,t=[]),!v(a,e)&&!v(f,e)&&(f[e]=[e,t,n])},n.amd={jQuery:!0}}(),n("almond",function(){}),n("mock",[],function(){function e(e,t,n){if(e.type=="FUNCTION")return e.value.apply(t,n);if(e.type=="EXCEPTION")throw e.value;return e.value}return function(t,n){var r=n&&n.runFunctions,i={};i._invocationCounts={},i._invocationCallbacks={},i._readCounts={},i._readCallbacks={},i._changeCounts={},i._writeCallbacks={},i._methods=[],i._members=[],i._stubs={};var s=function(e){console.log("MOCK [DEBUG] - registering member "+e),i._readCounts[e]=0,i._changeCounts[e]=0,i.__defineGetter__(e,function(){return console.log("MOCK [INFO] - getting "+e),i._readCounts[e]++,i._readCallbacks[e]instanceof Function&&i._readCallbacks[e](t[e]),t[e]}),i.__defineSetter__(e,function(n){console.log("MOCK [INFO] - setting "+e),t[e]!=n&&i._changeCounts[e]++,i._writeCallbacks[e]instanceof Function&&i._writeCallbacks[e](n),t[e]=n})},o=function(n){console.log("MOCK [DEBUG] - registering method "+n),i._invocationCounts[n]={all:0,arguments:{}},i._stubs[n]={arguments:{}},i[n]=function(){console.log("MOCK [INFO] - Verifying execution of "+n);var s=JSON.stringify(arguments),o;if(r)o=t[n].apply(t,arguments);else if(i._stubs[n].arguments[s]){var u=i._stubs[n].arguments[s];o=e(u,this,arguments)}else i._stubs[n].all?(u=i._stubs[n].all,o=e(u,this,arguments)):o=undefined;return i._invocationCounts[n].all++,i._invocationCounts[n][s]?i._invocationCounts[n][s]++:i._invocationCounts[n][s]=1,i._invocationCallbacks[n]instanceof Function&&i._invocationCallbacks[n](o,i._invocationCounts[n]),o},i[n].toString=function(){return"factmint.mock of "+n}};for(var u in t)t[u]instanceof Function?(o(u),i._methods.push(u)):(s(u),i._members.push(u));return i.toString=function(){return"\n   __         _         _     _                   _    \n  / _|__ _ __| |_ _ __ (_)_ _| |_   _ __  ___  __| |__ \n |  _/ _` / _|  _| '  \\| | ' \\  _| | '  \\/ _ \\/ _| / / \n |_| \\__,_\\__|\\__|_|_|_|_|_||_\\__| |_|_|_\\___/\\__|_\\_\\ \n "},i}}),n("when",[],function(){return function(e){var t={};return e._methods.forEach(function(n){t[n]={thenReturn:function(t){e._stubs[n].all={type:"RETURN_VALUE",value:t}},thenThrow:function(t){e._stubs[n].all={type:"EXCEPTION",value:t}},then:function(t){e._stubs[n].all={type:"FUNCTION",value:t}},withArguments:function(){var t=JSON.stringify(arguments);return{thenReturn:function(r){e._stubs[n].arguments[t]={type:"RETURN_VALUE",value:r}},thenThrow:function(r){e._stubs[n].arguments[t]={type:"EXCEPTION",value:r}},then:function(r){e._stubs[n].arguments[t]={type:"FUNCTION",value:r}}}}}}),t}}),n("verify",[],function(){return function(e){var t={};return e._members.forEach(function(n){t[n]={hasBeenRead:function(t){if(t instanceof Function)return t(e._readCounts[n]);if(typeof t=="number")return t==e._readCounts[n];if(!t)return e._readCounts[n]>0},checkGets:function(t){e._readCallbacks[n]=t},hasBeenChanged:function(t){if(t instanceof Function)return t(e._changeCounts[n]);if(typeof t=="number")return t==e._changeCounts[n];if(!t)return e._changeCounts[n]>0},checkSets:function(t){e._writeCallbacks[n]=t}}}),e._methods.forEach(function(n){t[n]={hasBeenInvoked:function(t){if(t instanceof Function)return t(e._invocationCounts[n].all);if(typeof t=="number")return t==e._invocationCounts[n].all;if(!t)return e._invocationCounts[n].all>0},withArguments:function(){var t=JSON.stringify(arguments);return{hasBeenInvoked:function(r){if(r instanceof Function)return r(e._invocationCounts[n][t]);if(typeof r=="number")return r==0&&typeof e._invocationCounts[n][t]=="undefined"?!0:r==e._invocationCounts[n][t];if(!r)return e._invocationCounts[n][t]>0}}},checkInvocations:function(t){e._invocationCallbacks[n]=t}}}),t}}),n("global",["mock","when","verify"],function(e,t,n){return{mock:e,when:t,verify:n}}),t("global")});