Move all core files into src/core.

Move Browser & Node specs to test against lib/jasmine.js instead of the separate source. Yes, this makes development a little harder but it's better to test that jasmine.js was built correctly.
This commit is contained in:
Davis W. Frank
2011-06-05 21:28:26 -07:00
parent ba10d178b2
commit e88d88e427
24 changed files with 23 additions and 35 deletions

22
src/core/Block.js Normal file
View File

@@ -0,0 +1,22 @@
/**
* Blocks are functions with executable code that make up a spec.
*
* @constructor
* @param {jasmine.Env} env
* @param {Function} func
* @param {jasmine.Spec} spec
*/
jasmine.Block = function(env, func, spec) {
this.env = env;
this.func = func;
this.spec = spec;
};
jasmine.Block.prototype.execute = function(onComplete) {
try {
this.func.apply(this.spec);
} catch (e) {
this.spec.fail(e);
}
onComplete();
};