require 'rails_helper'
require 'pretty_text'
describe PrettyText do
it "supports details tag" do
cooked_html = "foo
bar "
expect(PrettyText.cook("foo
bar ")).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