test/tilt_redcarpettemplate_test.rb in tilt-2.0.5 vs test/tilt_redcarpettemplate_test.rb in tilt-2.0.6

- old
+ new

@@ -36,19 +36,19 @@ end test "smartypants when :smart is set" do template = Tilt::RedcarpetTemplate.new(:smartypants => true) { |t| "OKAY -- 'Smarty Pants'" } - assert_match /<p>OKAY &ndash; (&#39;|&lsquo;)Smarty Pants(&#39;|&rsquo;)<\/p>/, + assert_match %r!<p>OKAY &ndash; (&#39;|&lsquo;)Smarty Pants(&#39;|&rsquo;)<\/p>!, template.render end test "smartypants with a rendererer instance" do template = Tilt::RedcarpetTemplate.new(:renderer => Redcarpet::Render::HTML.new(:hard_wrap => true), :smartypants => true) { |t| "OKAY -- 'Smarty Pants'" } - assert_match /<p>OKAY &ndash; (&#39;|&lsquo;)Smarty Pants(&#39;|&rsquo;)<\/p>/, + assert_match %r!<p>OKAY &ndash; (&#39;|&lsquo;)Smarty Pants(&#39;|&rsquo;)<\/p>!, template.render end end -rescue LoadError => boom +rescue LoadError warn "Tilt::RedcarpetTemplate (disabled)" end