-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarkonv_test.rb
52 lines (42 loc) · 1.08 KB
/
markonv_test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'minitest/autorun'
require_relative 'markonv'
class MarkonvTest < Minitest::Test
def setup
@markdown = <<~MARKDOWN
And **strong** and __bold__ are strong tags.
But *emphasis* and _emphasis_ are emphasis tags.
And this is the second paragraph
And this is the third paragraph and a list:
* One
* Two
* Three
Another paragraph
- Uno
- Dos
- Tres
A final paragraph
MARKDOWN
@html = <<~HTML.strip
<p>And <strong>strong</strong> and <strong>bold</strong> are strong tags.</p>
<p>But <em>emphasis</em> and <em>emphasis</em> are emphasis tags.</p>
<p>And this is the second paragraph</p>
<p>And this is the third paragraph and a list:</p>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
<p>Another paragraph</p>
<ul>
<li>Uno</li>
<li>Dos</li>
<li>Tres</li>
</ul>
<p>A final paragraph</p>
HTML
end
def test_markdown
markonv = Markonv.new(@markdown)
assert_equal @html, markonv.parse
end
end