require 'rails_helper' require 'pretty_text' describe PrettyText do it "supports details tag" do cooked_html = "
foobar
" expect(PrettyText.cook("
foobar
")).to match_html(cooked_html) cooked_html = <<~HTML
foo

bar

HTML expect(PrettyText.cook("[details=foo]\nbar\n[/details]")).to eq(cooked_html.strip) end end