node-query/node_modules/jsdoc/plugins/test/specs/railsTemplate.js

17 lines
743 B
JavaScript
Raw Normal View History

2014-10-22 10:11:40 -04:00
/*global describe: true, env: true, expect: true, it: true, jasmine: true */
2014-10-20 16:56:45 -04:00
describe("railsTemplate plugin", function() {
2014-10-22 10:11:40 -04:00
var parser = jasmine.createParser();
var path = require('jsdoc/path');
2014-10-20 16:56:45 -04:00
2014-10-22 10:11:40 -04:00
var pluginPath = path.join(env.dirname, 'plugins/railsTemplate');
var plugin = require(pluginPath);
2014-10-20 16:56:45 -04:00
2014-10-22 10:11:40 -04:00
require('jsdoc/plugins').installPlugins([pluginPath], parser);
2014-10-20 16:56:45 -04:00
require('jsdoc/src/handlers').attachTo(parser);
it("should remove <% %> rails template tags from the source of *.erb files", function() {
2014-10-22 10:11:40 -04:00
var docSet = parser.parse([path.join(env.dirname, "plugins/test/fixtures/railsTemplate.js.erb")]);
2014-10-20 16:56:45 -04:00
expect(docSet[2].description).toEqual("Remove rails tags from the source input (e.g. )");
});
});