From 6b55bd8359d2e167dc7b2ef584171633bc830b06 Mon Sep 17 00:00:00 2001 From: Jeff Larson Date: Thu, 7 Oct 2010 19:42:47 -0400 Subject: [PATCH 1/3] typo --- backbone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone.js b/backbone.js index 863f43fd..5d786d4c 100644 --- a/backbone.js +++ b/backbone.js @@ -514,7 +514,7 @@ return $(selector, this.el); }; - // Set up all interitable **Backbone.View** properties and methods. + // Set up all inheritable **Backbone.View** properties and methods. _.extend(Backbone.View.prototype, { // The default tagName of a View's element is "div". From 07e1b77ded04b70339e167b1435180556fa22560 Mon Sep 17 00:00:00 2001 From: Jeff Larson Date: Thu, 7 Oct 2010 20:00:13 -0400 Subject: [PATCH 2/3] stubbing out view test --- test/view.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/view.js b/test/view.js index e69de29b..a64fe0a9 100644 --- a/test/view.js +++ b/test/view.js @@ -0,0 +1,17 @@ +$(document).ready(function() { + module("Backbone View"); + + var View = Backbone.View.extend({ + className : "view", + render : function(){ + $(body).append(this.el); + } + }); + + var view = new View(); + + test("view: setMode", function(){ + view.setMode("active", "test"); + ok(view.el.hasClass("active_test"), "View should set modes"); + }); +}); \ No newline at end of file From c32d5360ae84f467050f3da558446f01a3bd6d57 Mon Sep 17 00:00:00 2001 From: Jeff Larson Date: Thu, 7 Oct 2010 20:19:06 -0400 Subject: [PATCH 3/3] fix a bug in view tests --- test/view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/view.js b/test/view.js index a64fe0a9..aba3c939 100644 --- a/test/view.js +++ b/test/view.js @@ -4,11 +4,12 @@ $(document).ready(function() { var View = Backbone.View.extend({ className : "view", render : function(){ - $(body).append(this.el); + $('body').append(this.el); } }); var view = new View(); + view.render(); test("view: setMode", function(){ view.setMode("active", "test");