{:uriI"›file:///app/spec/javascripts/flag_spec.coffee?type=application/javascript&pipeline=self&id=2264de6656cc467996c128d93b7fb17b0890a27f267bcdafa830715cd89bf542:ET:load_pathI"/app/spec/javascripts;T: filenameI"+/app/spec/javascripts/flag_spec.coffee;T: nameI"flag_spec;T:logical_pathI"flag_spec.self.js;T:content_typeI"application/javascript;T: sourceI"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); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"9file-digest:///app/spec/javascripts/flag_spec.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%:Õ‚ '&6 Ï1Ö«cfü$'`ÒÎÕbbž€ø „2þ: lengthiI:dependencies_digest"%hŽºÉòÞ¤®í `ÜÁõìÊÜ?r b¸›Á»—HkÔˆ0l:idI"E2264de6656cc467996c128d93b7fb17b0890a27f267bcdafa830715cd89bf542;F: mtimel+:vT