Sha256: c7ab58e961ee3989c5ae51a6dfab6b84f7d9dcc5d37fd54b52428208ea174938

Contents?: true

Size: 1.52 KB

Versions: 16

Compression:

Stored size: 1.52 KB

Contents

I"(function() {
  describe("Quby.Collections.Questions", function() {
    beforeEach(function() {
      this.questionOption = new Quby.Models.QuestionOption;
      this.question = new Quby.Models.Question({
        options: new Quby.Collections.QuestionOptions([this.questionOption])
      });
      this.questionC = new Quby.Collections.Questions;
      return this.questionC.add([this.question]);
    });
    describe("#noneVisible", function() {
      it("returns true if all questions are not visible", function() {
        this.questionC.each(function(question) {
          return question.isVisible = sinon.stub().returns(false);
        });
        return expect(this.questionC.noneVisible()).toEqual(true);
      });
      it("returns false if some questions are visible", function() {
        this.question.isVisible = sinon.stub().returns(true);
        return expect(this.questionC.noneVisible()).toEqual(false);
      });
      return it("returns false if there are no questions in the collection", function() {
        return expect(new Quby.Collections.Questions().noneVisible()).toEqual(false);
      });
    });
    return describe("#addQuestions", function() {
      return it('adds the question to the collection', function() {
        var allQuestions;
        allQuestions = new Quby.Collections.Questions;
        sinon.spy(allQuestions, 'add');
        allQuestions.addQuestions(this.questionC);
        return expect(allQuestions.add).toHaveBeenCalledWith(this.questionC.models);
      });
    });
  });

}).call(this);
:ET

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
quby-5.6.0 spec/internal/tmp/cache/assets/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.1.3 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.1.2 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.1.0 spec/internal/tmp/cache/assets/sprockets/v3.0/Lg/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.0.5 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.0.0 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-4.0.4 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.0.0.pre4 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.0.0.pre3 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.0.0.pre2 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-5.0.0.pre1 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-4.0.3 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-4.0.2 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-3.2.1 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-3.2.0 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache
quby-3.2.0.pre.pre1 spec/internal/tmp/cache/assets/test/sprockets/v3.0/LG/LGjGy9X5n-Ha3rR7I4ZAMuHbGewkheohnkhssZd9CW4.cache