summaryrefslogtreecommitdiff
path: root/test/text_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2012-12-11 15:00:08 -0700
committerDan Allen <dan.j.allen@gmail.com>2012-12-11 15:00:08 -0700
commit1f4f441638c0898afaa5a32f47f2cb75d6444d3a (patch)
treeb1fd86e7e426a3a96db46d3f2a97b59f5aeea556 /test/text_test.rb
parentdbeab67794a0e4c42b54688d71bbdf37f233e0e1 (diff)
restore escaped single quote after processing emphasis
Diffstat (limited to 'test/text_test.rb')
-rw-r--r--test/text_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/text_test.rb b/test/text_test.rb
index 579fedea..4616db9e 100644
--- a/test/text_test.rb
+++ b/test/text_test.rb
@@ -24,7 +24,11 @@ context "Text" do
end
test "emphasized text with escaped single quote" do
- assert_xpath "//em[text()=\"Johnny's\"]", render_string("It's 'Johnny\'s' phone")
+ assert_xpath "//em[text()=\"Johnny's\"]", render_string("It's 'Johnny\\'s' phone")
+ end
+
+ test "escaped single quote is restore as single quote" do
+ assert_xpath "//p[contains(text(), \"Let's do it!\")]", render_string("Let\\'s do it!")
end
test "emphasized text at end of line" do