summaryrefslogtreecommitdiff
path: root/test/text_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2017-07-22 03:07:29 -0600
committerDan Allen <dan.j.allen@gmail.com>2017-07-22 03:08:29 -0600
commitee1f18ba1934613f267a6503bfa5ea51c67484b5 (patch)
treea03fc68926f3bcd65350f453c3da44a6fac5d9e2 /test/text_test.rb
parentfb51f83f2d85f5d64271ead3d1fb8b69c56014fe (diff)
remove unnecessary nil_or_empty? checks in Substitutor; add missing test
Diffstat (limited to 'test/text_test.rb')
-rw-r--r--test/text_test.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/text_test.rb b/test/text_test.rb
index e03f2b18..5774c97f 100644
--- a/test/text_test.rb
+++ b/test/text_test.rb
@@ -286,16 +286,18 @@ This line is separated by something that is not a horizontal rule...
assert_xpath "//code/strong", rendered
end
- test "unconstrained quotes" do
- rendered_chars = render_string("**B**__I__++M++", :attributes => {'compat-mode' => ''})
- assert_xpath "//strong", rendered_chars
- assert_xpath "//em", rendered_chars
- assert_xpath "//code", rendered_chars
-
- rendered_chars = render_string("**B**__I__``M``")
- assert_xpath "//strong", rendered_chars
- assert_xpath "//em", rendered_chars
- assert_xpath "//code", rendered_chars
+ test 'unconstrained quotes' do
+ rendered_chars = render_string('**B**__I__++M++[role]++M++', :attributes => {'compat-mode' => ''})
+ assert_xpath '//strong', rendered_chars, 1
+ assert_xpath '//em', rendered_chars, 1
+ assert_xpath '//code[not(@class)]', rendered_chars, 1
+ assert_xpath '//code[@class="role"]', rendered_chars, 1
+
+ rendered_chars = render_string('**B**__I__``M``[role]``M``')
+ assert_xpath '//strong', rendered_chars, 1
+ assert_xpath '//em', rendered_chars, 1
+ assert_xpath '//code[not(@class)]', rendered_chars, 1
+ assert_xpath '//code[@class="role"]', rendered_chars, 1
end
end