{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"%2a8515898dd57f0682f8fb00eceac600;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"%daaff2fad1d50f3b231abbde57313c79;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"%ca55c40676a1a204866fef8ce954138b;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"%31b5b66d38fde31bc4135d42f3b781df;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"%b5235ec842b1d6d575887e5790c3dc9f;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"%9f214e23bd6bbd3aead4f04441c6436b;F{@&I"U/Users/Michael/Development/magic_lamp/app/assets/javascripts/magic_lamp/genie.js;F@(I"2014-10-12T16:02:31-05:00;T@*I"%1546cd5618eb595945ff27b4b4e1f034;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"%6e83ced2aa356ffbfb73fa867b2a880c;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"%a9a9c00c558b5d8adacb507bb17aa51d;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"%bc421fae9d54e6e43a8e0d58d6282cc2;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"%9c3902f52ca914b1a85461631154788e;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"%3d4eb4e7857680100f1f77da9f2180dd;FI" _version;TI"%d978939c91fa8a88b4612c4140ee433d;F