{I" class:ETI"ProcessedAsset;FI"logical_path;TI"spec_helper.js;FI" pathname;TI"J/Users/Michael/Development/magic_lamp/spec/javascripts/spec_helper.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+òTI" length;Ti^ I" digest;TI"%4be4197234cc0b03c12f4f7f91cb9737;FI" source;TI"^ // Teaspoon includes some support files, but you can use anything from your own support path too. // require support/expect // require support/sinon // require support/chai // require support/your-support-file // // PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion. // Use this polyfill to avoid the confusion. // // Deferring execution // If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call // Teaspoon.execute() after everything has been loaded. Simple example of a timeout: // // Teaspoon.defer = true // setTimeout(Teaspoon.execute, 1000) // // Matching files // By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your // spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the // configuration in config/initializers/teaspoon.rb // // Manifest // If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in // the configuration and use this file as a manifest. // // For more information: http://github.com/modeset/teaspoon // // Chai // If you're using Chai, you'll probably want to initialize your preferred assertion style. You can read more about Chai // at: http://chaijs.com/guide/styles // // window.assert = chai.assert; // window.expect = chai.expect; // window.should = chai.should(); // // You can require your own javascript files here. By default this will include everything in application, however you // may get better load performance if you require the specific files that are being used in the spec that tests them. window.expect = chai.expect; var spies; var stubs; var xhr; var requests; function spyOn(object, method, returnValue) { var spy = sinon.spy(object, method); spies.push(spy); return spy; } function stub(object, method, retVal) { var stubObj; if (_.isFunction(retVal)) { stubObj = sinon.stub(object, method, retVal); } else { stubObj = sinon.stub(object, method).returns(retVal); } stubs.push(stubObj); return stubObj; } function findByClassName(className) { return document.getElementsByClassName(className)[0]; } function testFixtureContainer() { return findByClassName('magic-lamp'); } function removeNode(node) { if (!!node && node.parentNode) { node.parentNode.removeChild(node); } } function stubNetwork() { xhr = sinon.useFakeXMLHttpRequest(); xhr.onCreate = function(xhr) { requests.push(xhr); }; } beforeEach(function() { spies = []; stubs = []; requests = []; }); afterEach(function() { _(spies).each(function(spy) { spy.restore(); }); _(stubs).each(function(stub) { stub.restore(); }); xhr && xhr.restore(); requests = undefined; xhr = undefined; subject = undefined; }); ;TI"dependency_digest;TI"%5506c845206ce9a0e6bc06964df40285;FI"required_paths;T[I"{/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/bind-poly.js;FI"Z/Users/Michael/Development/magic_lamp/app/assets/javascripts/magic_lamp/magic_lamp.js;FI"U/Users/Michael/Development/magic_lamp/app/assets/javascripts/magic_lamp/genie.js;FI"[/Users/Michael/Development/magic_lamp/app/assets/javascripts/magic_lamp/application.js;FI"U/Users/Michael/Development/magic_lamp/spec/javascripts/support/underscore-1.6.js;FI"{/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/chai.js;FI"Q/Users/Michael/Development/magic_lamp/spec/javascripts/support/chai-fuzzy.js;FI"|/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/sinon.js;FI"|/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/sinon-chai.js;FI"J/Users/Michael/Development/magic_lamp/spec/javascripts/spec_helper.js;FI"dependency_paths;T[{I" path;TI"J/Users/Michael/Development/magic_lamp/spec/javascripts/spec_helper.js;FI" mtime;TI"2014-09-12T08:16:13-05:00;TI" digest;TI"%b46a8d6f13a430061e46fb4ecc53fcd4;F{@&I"{/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/bind-poly.js;F@(I"2014-07-07T09:32:42-05:00;T@*I"%a7df7286b3bb216989d6ab6c9c129ef1;F{@&I"[/Users/Michael/Development/magic_lamp/app/assets/javascripts/magic_lamp/application.js;F@(I"2014-09-04T22:30:36-05:00;T@*I"%be5fd38e0cd973b8aa215a4f7ac57e45;F{@&I"Z/Users/Michael/Development/magic_lamp/app/assets/javascripts/magic_lamp/magic_lamp.js;F@(I"2014-09-08T18:48:50-05:00;T@*I"%ea9c118011d868e3f734aa0cfb5d83ab;F{@&I"U/Users/Michael/Development/magic_lamp/app/assets/javascripts/magic_lamp/genie.js;F@(I"2014-09-18T20:24:31-05:00;T@*I"%c16b8b5ccbc4eb1a485d8d71eb23ce46;F{@&I"U/Users/Michael/Development/magic_lamp/spec/javascripts/support/underscore-1.6.js;F@(I"2014-09-04T22:30:36-05:00;T@*I"%72f1c4709c9052aa65ee90e88b5475fe;F{@&I"{/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/chai.js;F@(I"2014-07-07T09:32:42-05:00;T@*I"%933abf67880cf59f178f449d5b87361d;F{@&I"Q/Users/Michael/Development/magic_lamp/spec/javascripts/support/chai-fuzzy.js;F@(I"2014-09-08T18:38:02-05:00;T@*I"%6c6ba6606e5976e82d14d21b1f1de346;F{@&I"|/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/sinon.js;F@(I"2014-07-07T09:32:42-05:00;T@*I"%089a13efa8e7f3655c15982aacf57fa1;F{@&I"|/Users/Michael/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/teaspoon-0.8.0/vendor/assets/javascripts/support/sinon-chai.js;F@(I"2014-07-07T09:32:42-05:00;T@*I"%d76e557207ef2e51158136ccf2dac808;FI" _version;TI"%ab99cd0f5431c7de63d5e152ef71df5c;F