o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356730063.462764: @value"O{I" class:EFI"ProcessedAsset;FI"logical_path;FI"1teabag/base/reporters/html/base_view_spec.js;FI" pathname;FI"g/Users/jejacks0n/Projects/teabag/spec/javascripts/teabag/base/reporters/html/base_view_spec.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-12-23T15:51:55-07:00;FI" length;Fiä I" digest;F"%91be54997b62c6095ef030c60c0a0582I" source;FI"ä (function() { describe("Teabag.Reporters.BaseView", function() { beforeEach(function() { return this.base = new Teabag.Reporters.BaseView(); }); describe("constructor", function() { return it("calls build", function() { var spy; spy = spyOn(Teabag.Reporters.BaseView.prototype, "build"); new Teabag.Reporters.BaseView(); return expect(spy).toHaveBeenCalled(); }); }); describe("#build", function() { return it("builds an element", function() { this.base.build("foo"); return expect(this.base.el.className).toBe("foo"); }); }); describe("#appendTo", function() { return it("calls appendChild on the passed element", function() { var el, spy; el = { appendChild: function() {} }; spy = spyOn(el, "appendChild"); this.base.appendTo(el); return expect(spy).toHaveBeenCalledWith(this.base.el); }); }); describe("#append", function() { return it("calls appendChild on our element", function() { var otherEl, spy; this.base.el = { appendChild: function() {} }; spy = spyOn(this.base.el, "appendChild"); otherEl = {}; this.base.append(otherEl); return expect(spy).toHaveBeenCalledWith(otherEl); }); }); describe("#createEl", function() { return it("creates an element with a className", function() { var el; el = this.base.createEl("em", "foo"); expect(el.tagName).toBe("EM"); return expect(el.className).toBe("foo"); }); }); describe("#findEl", function() { return it("finds an element and momoizes it", function() { this.base.findEl("controls"); return expect(this.base.elements["controls"]).toBeDefined(); }); }); describe("#setText", function() { return it("finds an el and sets it's innerText", function() { var el, spy; el = { innerHTML: "bar" }; spy = spyOn(this.base, "findEl").andReturn(el); this.base.setText("foo-id", "foo"); expect(spy).toHaveBeenCalledWith("foo-id"); return expect(el.innerHTML).toBe("foo"); }); }); describe("#setHtml", function() { return it("finds an el and sets it's innerHTML", function() { var el, spy; el = { innerHTML: "bar" }; spy = spyOn(this.base, "findEl").andReturn(el); this.base.setHtml("foo-id", "foo"); expect(spy).toHaveBeenCalledWith("foo-id"); return expect(el.innerHTML).toBe("foo"); }); }); describe("#setClass", function() { return it("finds an el and sets a class on it", function() { var el, spy; el = { className: "bar" }; spy = spyOn(this.base, "findEl").andReturn(el); this.base.setClass("foo-id", "foo"); expect(spy).toHaveBeenCalledWith("foo-id"); return expect(el.className).toBe("foo"); }); }); return describe("#htmlSafe", function() { return it("makes a string html safe", function() { return expect(this.base.htmlSafe("
")).toEqual("<div></div>"); }); }); }); }).call(this); ;TI"dependency_digest;F"%6b7c9eeebdcc20962dbb1d6a25a194fdI"required_paths;F[I"g/Users/jejacks0n/Projects/teabag/spec/javascripts/teabag/base/reporters/html/base_view_spec.coffee;FI"dependency_paths;F[{I" path;FI"g/Users/jejacks0n/Projects/teabag/spec/javascripts/teabag/base/reporters/html/base_view_spec.coffee;FI" mtime;FI"2012-12-23T15:51:55-07:00;FI" digest;F"%5b58268131663f9b71221da180908df0I" _version;F"%6776f581a4329e299531e1d52aa59832