# coding: UTF-8 require 'test_helper' class SmartyHTMLTest < Redcarpet::TestCase def setup @renderer = Redcarpet::Render::SmartyHTML end def test_that_smartyhtml_converts_single_quotes markdown = render("They're not for sale.") assert_equal "
They’re not for sale.
", markdown end def test_that_smartyhtml_converts_double_quotes rd = render(%("Quoted text")) assert_equal %(“Quoted text”
), rd end def test_that_smartyhtml_converts_double_hyphen rd = render("double hyphen -- ndash") assert_equal "double hyphen – ndash
", rd end def test_that_smartyhtml_converts_triple_hyphen rd = render("triple hyphen --- mdash") assert_equal "triple hyphen — mdash
", rd end def test_that_smartyhtml_ignores_double_hyphen_in_code rd = render("double hyphen in `--option`") assert_equal "double hyphen in --option