fix broken spec

This commit is contained in:
Sam 2017-07-18 14:44:49 -04:00
parent 93e5112dfa
commit 660d5e0a35
1 changed files with 10 additions and 2 deletions

View File

@ -4,9 +4,17 @@ require 'pretty_text'
describe PrettyText do
it "supports details tag" do
cooked_html = "<details><summary>foo</summary>\n\n<p>bar</p>\n\n</details>"
cooked_html = "<details><summary>foo</summary>bar</details>"
expect(PrettyText.cook("<details><summary>foo</summary>bar</details>")).to match_html(cooked_html)
expect(PrettyText.cook("[details=foo]bar[/details]")).to match_html(cooked_html)
cooked_html = <<~HTML
<details>
<summary>
foo</summary>
<p>bar</p>
</details>
HTML
expect(PrettyText.cook("[details=foo]\nbar\n[/details]")).to eq(cooked_html.strip)
end
end