You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2012/07/13 08:15:41 UTC

[9/14] git commit: Add bind initialization call.

Add bind initialization call.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/commit/5fe4752e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/tree/5fe4752e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/diff/5fe4752e

Branch: refs/heads/hello-cordova
Commit: 5fe4752e3ca098d14bfba3ef1362477e24bd126c
Parents: fc2c23c
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Thu Jul 12 21:34:20 2012 -0700
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Thu Jul 12 21:34:20 2012 -0700

----------------------------------------------------------------------
 www/js/index.js   |    3 +++
 www/spec/index.js |    6 ++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/5fe4752e/www/js/index.js
----------------------------------------------------------------------
diff --git a/www/js/index.js b/www/js/index.js
index 7e4402e..67f3ed4 100644
--- a/www/js/index.js
+++ b/www/js/index.js
@@ -1,4 +1,7 @@
 var app = {
     initialize: function() {
+        this.bind();
+    },
+    bind: function() {
     }
 };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/5fe4752e/www/spec/index.js
----------------------------------------------------------------------
diff --git a/www/spec/index.js b/www/spec/index.js
index f6856c8..7d48350 100644
--- a/www/spec/index.js
+++ b/www/spec/index.js
@@ -7,5 +7,11 @@ describe('app', function() {
         it('should exist', function() {
             expect(app.initialize).toBeDefined();
         });
+
+        it('should bind events', function() {
+            spyOn(app, 'bind');
+            app.initialize();
+            expect(app.bind).toHaveBeenCalled();
+        });
     });
 });