var Gallery = Backbone.Model.extend({ timeout: 3000, setTimeout: function(num) { this.timeout = num; } }); var myGallery = new Gallery(); myGallery.setTimeout(5000); var otherGallery = new Gallery(); otherGallery.setTimeout(1000); describe('myGallery', function() { it('should have it\'s own timeout property', function() { expect(myGallery.hasOwnProperty('timeout')).toBe(true); }); it('should NOT have it\'s own setTimeout property', function() { expect(myGallery.hasOwnProperty('setTimeout')).toBe(false); }); it('should have a timeout of 5000', function() { expect(myGallery.timeout).toEqual(5000); }); }); describe('otherGallery', function() { it('should have it\'s own timeout property', function() { expect(myGallery.hasOwnProperty('timeout')).toBe(true); }); it('should NOT have it\'s own setTimeout property', function() { expect(myGallery.hasOwnProperty('setTimeout')).toBe(false); }); it('should have a timeout of 1000', function() { expect(otherGallery.timeout).toEqual(1000); }); });