Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #6 from marcenuc/patch-1

Check that loadController is called once.
  • Loading branch information...
commit 6cda68b7c6f9fcb14df44292a21f6432a9594cd4 2 parents 2a39da6 + 6206459
authored March 09, 2012

Showing 1 changed file with 4 additions and 6 deletions. Show diff stats Hide diff stats

  1. 10  testing/tests/stages/DispatcherTest.js
10  testing/tests/stages/DispatcherTest.js
@@ -54,11 +54,11 @@ module.exports["basics"] = {
54 54
 
55 55
         test.equal(d.getConfig(), config);
56 56
         
57  
-        var loaded = {};
  57
+        var loaded = {"test1": 0, "default": 0};
58 58
         
59 59
         d.loadController = function(baseDir, name) {
60 60
             test.equal(baseDir, testbench.fixturesDir + '/controllers');
61  
-            loaded[name] = 1;
  61
+            loaded[name] += 1;
62 62
         };
63 63
 
64 64
         Q.when(d.isReady(),
@@ -109,11 +109,11 @@ module.exports["basics"] = {
109 109
 
110 110
         var d = new Dispatcher();
111 111
 
112  
-        var loaded = {};
  112
+        var loaded = {"test1": 0, "default": 0};
113 113
 
114 114
         d.loadController = function(baseDir, name) {
115 115
             test.equal(baseDir, testbench.fixturesDir + '/controllers');
116  
-            loaded[name] = 1;
  116
+            loaded[name] += 1;
117 117
         };
118 118
 
119 119
         d.setUp(testbench.fixturesDir + '/controllers').then(
@@ -128,8 +128,6 @@ module.exports["basics"] = {
128 128
 
129 129
         var d = new Dispatcher();
130 130
 
131  
-        var exp = ['default', 'test1'];
132  
-
133 131
         d.loadController = function(baseDir, name) {
134 132
             throw new Error("in our bedroom after the war");
135 133
         };

0 notes on commit 6cda68b

Please sign in to comment.
Something went wrong with that request. Please try again.