jsdoc/plugins/test/specs/railsTemplate.js
Jeff Williams 751bea1b0a fixes for Node.js compatibility (see details)
- new Rhino .jar to help find module paths
(https://github.com/hegemonic/rhino/commit/31b70105)
- make __dirname and process.cwd() provide the current module path; use
only env.dirname for JSDoc's home dir; fix callers
- get rid of jsdoc/util/include (and update test framework accordingly)
- avoid running Rhino/Node.js tests on the wrong runtime
- remove support for global 'publish' function, which relied upon
jsdoc/util/include
- update jsdoc/util/dumper for consistency with Node.js'
JSON.stringify()
- fix jsdoc/util/runtime to detect Node.js correctly
- add Node.js versions of jsdoc/fs and jsdoc/path
- other minor cleanup
2013-10-25 23:30:56 -07:00

18 lines
749 B
JavaScript

/*global describe: true, env: true, expect: true, it: true */
describe("railsTemplate plugin", function() {
var parser = new (require("jsdoc/src/parser")).Parser();
var path = require('jsdoc/path');
var pluginPath = path.join(env.dirname, 'plugins/railsTemplate');
var plugin = require(pluginPath);
require('jsdoc/plugins').installPlugins([pluginPath], parser);
require('jsdoc/src/handlers').attachTo(parser);
it("should remove <% %> rails template tags from the source of *.erb files", function() {
var docSet = parser.parse([path.join(env.dirname, "plugins/test/fixtures/railsTemplate.js.erb")]);
expect(docSet[2].description).toEqual("Remove rails tags from the source input (e.g. )");
});
});