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 – ('|‘)Smarty Pants('|’)<\/p>/,
+ assert_match %r!<p>OKAY – ('|‘)Smarty Pants('|’)<\/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 – ('|‘)Smarty Pants('|’)<\/p>/,
+ assert_match %r!<p>OKAY – ('|‘)Smarty Pants('|’)<\/p>!,
template.render
end
end
-rescue LoadError => boom
+rescue LoadError
warn "Tilt::RedcarpetTemplate (disabled)"
end