o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1367990552.048519:@value"�{I"
class:EFI"BundledAsset;�FI"logical_path;�FI"1teabag/base/reporters/html/base_view_spec.js;�TI"
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"2013-01-21T15:52:04-07:00;�FI"length;�Fi�I"digest;�F"%71a2c4c7c222b4fe0720cc8a55ddad89I"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("<div></div>")).toEqual("&lt;div&gt;&lt;/div&gt;");
      });
    });
  });

}).call(this);
;�FI"required_assets_digest;�F"%e1c43fed26f1fc40812563ad16152dd7I"
_version;�F"%6776f581a4329e299531e1d52aa59832