Sha256: 477c36a95b84986207a1da57e8235eb6511a4f1845f25c10305cbc43918071b7
Contents?: true
Size: 1.33 KB
Versions: 18
Compression:
Stored size: 1.33 KB
Contents
I"I(function() { describe("Quby.Models.Flag", function() { beforeEach(function() { this.flag = new Quby.Models.Flag({ key: 'testkey', hidesQuestionsKeys: ["v_1"], showsQuestionsKeys: ["v_2"] }); this.v_1 = new Quby.Models.Question({ key: "v_1" }); this.v_2 = new Quby.Models.Question({ key: "v_2" }); return this.questions = new Quby.Collections.Questions([this.v_1, this.v_2]); }); return describe("#initShowsHides", function() { it('looks up the hidesQuestionsKeys in the question collection to initialize the hidesQuestions collection', function() { this.flag.initShowsHides(this.questions); return this.flag.get("hidesQuestions").should === new Quby.Collections.Questions([this.v_1]); }); it('looks up the showsQuestionsKeys in the question collection to initialize the showsQuestions collection', function() { this.flag.initShowsHides(this.questions); return this.flag.get("showsQuestions").should === new Quby.Collections.Questions([this.v_2]); }); return it('calls doHiding', function() { var spy; spy = sinon.spy(this.flag, 'doHiding'); this.flag.initShowsHides(this.questions); return expect(spy).toHaveBeenCalled(); }); }); }); }).call(this); :ET
Version data entries
18 entries across 18 versions & 1 rubygems