{I" class:EFI"BundledAsset;FI"logical_path;FI"%teaspoon/jasmine/runner_jspec.js;TI" pathname;FI"]/Users/jejacks0n/Projects/teaspoon/spec/javascripts/teaspoon/jasmine/runner_jspec.coffee;FI"content_type;FI"application/javascript;FI" mtime;Fl+-¾QI" length;Fi» I" digest;F"%2a8c9c2fcaaa4f0d3a62ec56a6509e1bI" source;FI"» (function() { describe("Jasmine Teaspoon.Runner", function() { beforeEach(function() { this.env = jasmine.getEnv(); this.originalFilter = this.env.specFilter; this.executeSpy = spyOn(this.env, "execute"); return this.runner = new Teaspoon.Runner(); }); afterEach(function() { return this.env.specFilter = this.originalFilter; }); describe("constructor", function() { return it("calls execute on the jasmine env", function() { return expect(this.executeSpy).toHaveBeenCalled(); }); }); describe("#setup", function() { beforeEach(function() { this.runner.params = { grep: "foo" }; if (window.navigator.userAgent.match(/PhantomJS/)) { this.reporterSpy = spyOn(Teaspoon.Reporters, "Console").andReturn(this.instance); } else { this.reporterSpy = spyOn(Teaspoon.Reporters, "HTML").andReturn(this.instance); } return this.addReporterSpy = spyOn(this.env, "addReporter"); }); it("sets the updateInterval", function() { return expect(this.env.updateInterval).toEqual(1000); }); it("adds the reporter to the env", function() { this.runner.setup(); expect(this.reporterSpy).toHaveBeenCalled(); return expect(this.addReporterSpy).toHaveBeenCalled(); }); return it("adds fixture support", function() { var spy; spy = spyOn(this.runner, "addFixtureSupport"); this.runner.setup(); return expect(spy).toHaveBeenCalled(); }); }); return describe("#addFixtureSupport", function() { beforeEach(function() { this.fixtureObj = { cleanUp: function() {} }; this.styleFixtureObj = { cleanUp: function() {} }; this.jsonFixtureSpyObj = { cleanUp: function() {} }; this.fixtureSpy = spyOn(jasmine, "getFixtures").andReturn(this.fixtureObj); this.styleFixtureSpy = spyOn(jasmine, "getStyleFixtures").andReturn(this.styleFixtureObj); return this.jsonFixtureSpy = spyOn(jasmine, "getJSONFixtures").andReturn(this.jsonFixtureSpyObj); }); return it("adds fixture support", function() { expect(jasmine.getFixtures).toBeDefined(); this.runner.fixturePath = "/path/to/fixtures"; this.runner.addFixtureSupport(); expect(this.fixtureObj.containerId).toBe("teaspoon-fixtures"); expect(this.fixtureObj.fixturesPath).toBe("/path/to/fixtures"); expect(this.styleFixtureObj.fixturesPath).toBe("/path/to/fixtures"); return expect(this.jsonFixtureSpyObj.fixturesPath).toBe("/path/to/fixtures"); }); }); }); }).call(this); ;TI"required_assets_digest;F"%0c3512c2f11f41674f7d3a74eacafadaI" _version;F"%7097359102b3db973d6242ce2db779ef