Permalink
Browse files

Check that loadController is called once.

  • Loading branch information...
marcenuc committed Mar 9, 2012
1 parent 2a39da6 commit 62064591db4fd0b772d3f16274782ab7c685959b
Showing with 4 additions and 6 deletions.
  1. +4 −6 testing/tests/stages/DispatcherTest.js
@@ -54,11 +54,11 @@ module.exports["basics"] = {
test.equal(d.getConfig(), config);
- var loaded = {};
+ var loaded = {"test1": 0, "default": 0};
d.loadController = function(baseDir, name) {
test.equal(baseDir, testbench.fixturesDir + '/controllers');
- loaded[name] = 1;
+ loaded[name] += 1;
};
Q.when(d.isReady(),
@@ -109,11 +109,11 @@ module.exports["basics"] = {
var d = new Dispatcher();
- var loaded = {};
+ var loaded = {"test1": 0, "default": 0};
d.loadController = function(baseDir, name) {
test.equal(baseDir, testbench.fixturesDir + '/controllers');
- loaded[name] = 1;
+ loaded[name] += 1;
};
d.setUp(testbench.fixturesDir + '/controllers').then(
@@ -128,8 +128,6 @@ module.exports["basics"] = {
var d = new Dispatcher();
- var exp = ['default', 'test1'];
-
d.loadController = function(baseDir, name) {
throw new Error("in our bedroom after the war");
};

0 comments on commit 6206459

Please sign in to comment.