o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1371403723.405605: @value"Þ {I" class:EFI"BundledAsset;FI"logical_path;FI"teabag/base/runner_spec.js;TI" pathname;FI"U/Users/jejacks0n/Projects/teabag/spec/javascripts/teabag/base/runner_spec.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-02-10T16:51:11-07:00;FI" length;Fiþ I" digest;F"%117ce08c92d7057e9455a84be057e50dI" source;FI"þ (function() { describe("Teabag.Runner", function() { beforeEach(function() { spyOn(jasmine.getEnv(), "execute"); Teabag.Runner.run = false; return this.setupSpy = spyOn(Teabag.Runner.prototype, "setup"); }); describe("constructor", function() { it("calls setup", function() { new Teabag.Runner(); return expect(this.setupSpy).toHaveBeenCalled(); }); it("sets Teabag.Runner.run to true", function() { new Teabag.Runner(); return expect(Teabag.Runner.run).toEqual(true); }); it("sets @fixturePath to whatever was in Teabag.root", function() { var originalRoot, runner; originalRoot = Teabag.root; Teabag.root = "/path/to"; runner = new Teabag.Runner(); expect(runner.fixturePath).toEqual("/path/to/fixtures"); return Teabag.root = originalRoot; }); return it("doesn't call setup if already run", function() { Teabag.Runner.run = true; new Teabag.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 Teabag.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 Teabag.Runner(); runner.params = {}; spyOn(String.prototype, 'match').andReturn(20); return expect(runner.getReporter()).toBe(Teabag.Reporters.Console); }); it("returns the correct reporter when using the browser", function() { var runner; runner = new Teabag.Runner(); runner.params = {}; spyOn(String.prototype, 'match').andReturn(0); return expect(runner.getReporter()).toBe(Teabag.Reporters.HTML); }); return it("allows setting the param", function() { var runner; runner = new Teabag.Runner(); runner.params = { reporter: "Console" }; expect(runner.getReporter()).toBe(Teabag.Reporters.Console); runner.params = { reporter: "HTML" }; return expect(runner.getReporter()).toBe(Teabag.Reporters.HTML); }); }); }); }).call(this); ;FI"required_assets_digest;F"%6bb11a98fba3acfdd8856899e74d7d37I" _version;F"%6776f581a4329e299531e1d52aa59832