P.S. the test code was written by following the current docs. Here's one of the tests that used to pass but no longer loads:
YUI.add('ManagerMojit-tests', function(Y) {
var suite = new YUITest.TestSuite('ManagerMojit-tests'),
controller = null,
doneResults = null,
A = YUITest.Assert;
suite.add(new YUITest.TestCase({
name: 'ManagerMojit',
setUp: function() {
controller = Y.mojito.controllers.ManagerMojit;
controller.index({
done: function(data) {
doneResults = data;
}
});
},
tearDown: function() {
controller = null;
},
'should display all managers': function() {
A.areSame("Managers", doneResults.title);
A.areSame(2, doneResults.managers.length);
},
'should display manager names and handicaps': function() {
var george = doneResults.managers[0];
A.areSame("George", george.name);
A.areSame(2.5, george.handicap);
var joe = doneResults.managers[1];
A.areSame("Joe", joe.name);
A.areSame(10, joe.handicap);
}
}));
YUITest.TestRunner.add(suite);
}, '0.0.1', {requires: ['mojito-test', 'ManagerMojit']});