Compliant with Ruby 2.0.0

This commit is contained in:
Parker Moore 2013-04-26 21:20:48 +02:00
parent fe36b0f479
commit 46ce757b71
3 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,8 @@
language: ruby
before_install:
- gem install bundler
rvm:
- 2.0.0
- 1.9.3
- 1.9.2
- 1.8.7

View File

@ -25,7 +25,7 @@ class TestConvertible < Test::Unit::TestCase
ret = @convertible.read_yaml(@base, name)
assert_equal({}, ret)
end
assert_match(/YAML Exception|syntax error/, out)
assert_match(/YAML Exception|syntax error|Error reading file/, out)
assert_match(/#{File.join(@base, name)}/, out)
end

View File

@ -1,3 +1,5 @@
# encoding: UTF-8
require 'helper'
class TestKramdown < Test::Unit::TestCase
@ -23,11 +25,11 @@ class TestKramdown < Test::Unit::TestCase
should "convert quotes to smart quotes" do
markdown = Converters::Markdown.new(@config)
assert_equal "<p>&#8220;Pit&#8217;hy&#8221;</p>", markdown.convert(%{"Pit'hy"}).strip
assert_match /<p>(&#8220;|“)Pit(&#8217;|)hy(&#8221;|”)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
override = { 'kramdown' => { 'smart_quotes' => 'lsaquo,rsaquo,laquo,raquo' } }
markdown = Converters::Markdown.new(@config.deep_merge(override))
assert_equal "<p>&#171;Pit&#8250;hy&#187;</p>", markdown.convert(%{"Pit'hy"}).strip
assert_match /<p>(&#171;|«)Pit(&#8250;|)hy(&#187;|»)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
end
end
end