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