jsdoc/plugins/test/specs/railsTemplate.js
Jeff Williams ae94af0cd8 turn env global into a module, and use the module instead of the global (#812)
The `env` global remains available, since templates and plugins may rely upon it, but it's deprecated as of JSDoc 3.4.0.
2015-02-17 19:07:10 -08:00

20 lines
718 B
JavaScript

'use strict';
describe('railsTemplate plugin', function() {
var env = require('jsdoc/env');
var path = require('jsdoc/path');
var parser = jasmine.createParser();
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. )');
});
});