incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwbro...@apache.org
Subject [38/48] git commit: Add bind initialization call.
Date Wed, 01 Aug 2012 16:39:09 GMT
Add bind initialization call.


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

Branch: refs/heads/master
Commit: 5fe4752e3ca098d14bfba3ef1362477e24bd126c
Parents: fc2c23c
Author: Michael Brooks <michael@michaelbrooks.ca>
Authored: Thu Jul 12 21:34:20 2012 -0700
Committer: Michael Brooks <michael@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-app-hello-world/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-app-hello-world/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();
+        });
     });
 });


Mime
View raw message