[spec] Refactor doclet.compile spec.
diff --git a/spec/doclet/index.spec.js b/spec/doclet/index.spec.js
index 13b5498..5704657 100644
--- a/spec/doclet/index.spec.js
+++ b/spec/doclet/index.spec.js
@@ -16,15 +16,25 @@
spyOn(dir, 'paths');
});
- it('should not require path argument', function() {
- expect(doclet.compile).not.toThrow();
- });
+ describe('path parameter', function() {
+ it('should not be required', function() {
+ expect(doclet.compile).not.toThrow();
+ });
- it('should default path to cwd', function() {
- doclet.compile();
- expect(dir.paths).toHaveBeenCalledWith(
- process.cwd(),
- jasmine.any(Function)
- );
+ it('should default cwd', function() {
+ doclet.compile();
+ expect(dir.paths).toHaveBeenCalledWith(
+ process.cwd(),
+ jasmine.any(Function)
+ );
+ });
+
+ it('should be supported', function() {
+ doclet.compile(options);
+ expect(dir.paths).toHaveBeenCalledWith(
+ options,
+ jasmine.any(Function)
+ );
+ });
});
});