o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356489153.1960871: @value"› {I" class:EFI"BundledAsset;FI"logical_path;FI"teabag/base/runner_spec.js;FI" pathname;FI"U/Users/jejacks0n/Projects/teabag/spec/javascripts/teabag/base/runner_spec.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-12-23T17:04:52-07:00;FI" length;Fi» I" digest;F"%bb00b634258bc55593dd5d8a4d8c9dddI" 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.fixturePath", function() { var runner; Teabag.fixturePath = "/path/to/fixtures"; runner = new Teabag.Runner(); return expect(runner.fixturePath).toEqual("/path/to/fixtures"); }); 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"%06db7f6f641cb6153355a055b73d08aaI" _version;F"%6776f581a4329e299531e1d52aa59832