Comparing version 0.8.2 to 0.8.3
@@ -61,2 +61,4 @@ /* | ||
} | ||
return this; | ||
}, | ||
@@ -63,0 +65,0 @@ |
{ | ||
"name": "gear", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"description": "Gear.js - Build System for Node.js and the Browser", | ||
@@ -19,6 +19,6 @@ "author": "Stephen Murphy <stephen@hypernaut.com>", | ||
"devDependencies": { | ||
"should": "0.6.x", | ||
"mocha": "1.0.x", | ||
"should": "1.2.x", | ||
"mocha": "1.7.x", | ||
"gear-lib": ">= 0.8.x" | ||
} | ||
} |
@@ -1,9 +0,48 @@ | ||
var Registry = require('../lib/registry').Registry; | ||
var Registry = require('../lib/registry').Registry, | ||
path = require('path'), | ||
fixtures = { | ||
dirname: path.join(process.cwd(), "test/fixtures/test-tasks"), | ||
filename: path.join(process.cwd(), "test/fixtures/test-tasks/index.js") | ||
}; | ||
describe('Registry', function() { | ||
describe('load()', function() { | ||
it('should load modules'); | ||
it('should load directories'); | ||
it('should load files'); | ||
it('should load modules', function() { | ||
var registry = new Registry(); | ||
registry.load({module: 'gear-lib'}); | ||
registry.tasks.should.include('csslint'); | ||
registry.tasks.should.include('jslint'); | ||
registry.tasks.should.include('s3'); | ||
registry.tasks.should.include('glob'); | ||
}); | ||
it('should load directories', function() { | ||
var registry = new Registry(); | ||
registry.load({dirname: fixtures.dirname}); | ||
registry.tasks.should.include('fooga'); | ||
}); | ||
it('should load files', function() { | ||
var registry = new Registry(); | ||
registry.load({filename: fixtures.filename}); | ||
registry.tasks.should.include('fooga'); | ||
}); | ||
it('should allow for chaining #load', function() { | ||
var registry = new Registry(); | ||
registry.load({ | ||
tasks : { | ||
fooga : function() {} | ||
} | ||
}).tasks.should.eql(registry.tasks); | ||
}); | ||
}); | ||
}); | ||
}); |
706241
48
5408