text context extracted

This commit is contained in:
Andres Ornelas 2010-07-27 16:02:51 -07:00
parent 32c4aee1cd
commit e8b477f5b1
2 changed files with 21 additions and 38 deletions

View file

@ -1,24 +1,7 @@
describe('Runner', function() {
var scenario, runner, log, Describe, It, $scenario, body;
function logger(text) {
return function(done){
log += text;
(done||noop)();
};
}
beforeEach(function() {
log = '';
scenario = {};
body = _jQuery('<div></div>');
runner = new angular.scenario.Runner(scenario, _jQuery);
Describe = scenario.describe;
BeforeEach = scenario.beforeEach;
AfterEach = scenario.afterEach;
It = scenario.it;
$scenario = scenario.$scenario;
setUpContext();
});
describe('describe', function() {

View file

@ -1,20 +1,20 @@
//var scenario, runner, log, Describe, It, $scenario, body;
//
//function logger(text) {
// return function(done){
// log += text;
// (done||noop)();
// };
//}
//
//function beforeEach() {
// log = '';
// scenario = {};
// body = _jQuery('<div></div>');
// runner = new angular.scenario.Runner(scenario, _jQuery);
// Describe = scenario.describe;
// BeforeEach = scenario.beforeEach;
// AfterEach = scenario.afterEach;
// It = scenario.it;
// $scenario = scenario.$scenario;
//}
var scenario, runner, log, $scenario, Describe, It, body;
function logger(text) {
return function(done){
log += text;
(done||noop)();
};
}
function setUpContext() {
scenario = {};
runner = new angular.scenario.Runner(scenario, _jQuery);
$scenario = scenario.$scenario;
Describe = scenario.describe;
BeforeEach = scenario.beforeEach;
AfterEach = scenario.afterEach;
It = scenario.it;
log = '';
body = _jQuery('<div></div>');
}