Changeset 4864
- Timestamp:
- 08/30/06 04:02:15 (2 years ago)
- Files:
-
- spinoffs/scriptaculous/src/unittest.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/scriptaculous/src/unittest.js
r4863 r4864 387 387 this.name = name; 388 388 389 if(t est instanceof Array) {389 if(typeof test == 'string') { 390 390 this.test = function() { 391 var preppedTest = test.join('\n'); 392 ['assert','wait','benchmark','info'].each(function(i){ 393 preppedTest = preppedTest.gsub(i,'this.'+i); 394 }); 395 eval(preppedTest); 391 eval('with(this){'+test+'}'); 396 392 } 397 393 } else { … … 441 437 return statement.strip() 442 438 }); 443 compiledSpec[testName] = body ;439 compiledSpec[testName] = body.join('\n'); 444 440 } 445 441 }