require 'spec_helper' describe Banzai::Filter::MermaidFilter do include FilterSpecHelper it 'adds `js-render-mermaid` class to the `pre` tag' do doc = filter("
graph TD;\n A-->B;\n
")
result = doc.xpath('descendant-or-self::pre').first
expect(result[:class]).to include('js-render-mermaid')
end
end