if(typeof jasmine!=="undefined"){var describeForAjax=jasmine.Env.prototype.describe;jasmine.Env.prototype.describe=function(b,a){return describeForAjax.call(this,b,function(){var c=Mimic.Ajax.getInstance();a.call(this,c.request);});};var beforeEachForAjax=jasmine.Env.prototype.beforeEach;jasmine.Env.prototype.beforeEach=function(a){return beforeEachForAjax.call(this,function(){a.call(this,Mimic.Ajax.getInstance().request);});};var itForAjax=jasmine.Env.prototype.it;jasmine.Env.prototype.it=function(b,a){return itForAjax.call(this,b,function(){var c=Mimic.Ajax.getInstance();a.call(this,c.request);c.reset();});};}var Mimic={};Mimic.Ajax=function(){var c=[],a=function(d){return{toHaveResponse:function(e,f){c.push({url:d,text:f,status:e});}};};var b=XMLHttpRequest;XMLHttpRequest=function(){if(c.length===0){return new b();}return new function(){this.onreadystatechange=undefined;this.readyState=-1;this.responseText=null;this.responseXML=null;this.status=-1;this.statusText=null;this.open=function(k,g,j,d,f){var h,e=false;for(h=0;h