{I" class:EFI"BundledAsset;FI"logical_path;FI"!teaspoon/base/runner_spec.js;TI" pathname;FI"Y/Users/jejacks0n/Projects/teaspoon/spec/javascripts/teaspoon/base/runner_spec.coffee;FI"content_type;FI"application/javascript;FI" mtime;Fl+Qú½QI" length;Fi* I" digest;F"%300c4ff107aef400e6abf64bfea91551I" source;FI"* (function() { describe("Teaspoon.Runner", function() { beforeEach(function() { spyOn(jasmine.getEnv(), "execute"); Teaspoon.Runner.run = false; return this.setupSpy = spyOn(Teaspoon.Runner.prototype, "setup"); }); describe("constructor", function() { it("calls setup", function() { new Teaspoon.Runner(); return expect(this.setupSpy).toHaveBeenCalled(); }); it("sets Teaspoon.Runner.run to true", function() { new Teaspoon.Runner(); return expect(Teaspoon.Runner.run).toEqual(true); }); it("sets @fixturePath to whatever was in Teaspoon.root", function() { var originalRoot, runner; originalRoot = Teaspoon.root; Teaspoon.root = "/path/to"; runner = new Teaspoon.Runner(); expect(runner.fixturePath).toEqual("/path/to/fixtures"); return Teaspoon.root = originalRoot; }); return it("doesn't call setup if already run", function() { Teaspoon.Runner.run = true; new Teaspoon.Runner(); return expect(this.setupSpy).wasNotCalled(); }); }); describe("#getParams", function() { return it("gets the params out of the window.location.search", function() { var runner; spyOn(String.prototype, "substring").andReturn("grep=foo&bar=baz"); runner = new Teaspoon.Runner(); return expect(runner.params).toEqual({ grep: "foo", bar: "baz" }); }); }); return describe("#getReporter", function() { it("returns the correct reporter when using PhantomJS", function() { var runner; runner = new Teaspoon.Runner(); runner.params = {}; spyOn(String.prototype, 'match').andReturn(20); return expect(runner.getReporter()).toBe(Teaspoon.Reporters.Console); }); it("returns the correct reporter when using the browser", function() { var runner; runner = new Teaspoon.Runner(); runner.params = {}; spyOn(String.prototype, 'match').andReturn(0); return expect(runner.getReporter()).toBe(Teaspoon.Reporters.HTML); }); return it("allows setting the param", function() { var runner; runner = new Teaspoon.Runner(); runner.params = { reporter: "Console" }; expect(runner.getReporter()).toBe(Teaspoon.Reporters.Console); runner.params = { reporter: "HTML" }; return expect(runner.getReporter()).toBe(Teaspoon.Reporters.HTML); }); }); }); }).call(this); ;TI"required_assets_digest;F"%324c5480574519b7d94c05583956ded2I" _version;F"%7097359102b3db973d6242ce2db779ef