Compliant with Ruby 2.0.0
This commit is contained in:
parent
fe36b0f479
commit
46ce757b71
|
|
@ -1,5 +1,8 @@
|
||||||
language: ruby
|
language: ruby
|
||||||
|
before_install:
|
||||||
|
- gem install bundler
|
||||||
rvm:
|
rvm:
|
||||||
|
- 2.0.0
|
||||||
- 1.9.3
|
- 1.9.3
|
||||||
- 1.9.2
|
- 1.9.2
|
||||||
- 1.8.7
|
- 1.8.7
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class TestConvertible < Test::Unit::TestCase
|
||||||
ret = @convertible.read_yaml(@base, name)
|
ret = @convertible.read_yaml(@base, name)
|
||||||
assert_equal({}, ret)
|
assert_equal({}, ret)
|
||||||
end
|
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)
|
assert_match(/#{File.join(@base, name)}/, out)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# encoding: UTF-8
|
||||||
|
|
||||||
require 'helper'
|
require 'helper'
|
||||||
|
|
||||||
class TestKramdown < Test::Unit::TestCase
|
class TestKramdown < Test::Unit::TestCase
|
||||||
|
|
@ -23,11 +25,11 @@ class TestKramdown < Test::Unit::TestCase
|
||||||
|
|
||||||
should "convert quotes to smart quotes" do
|
should "convert quotes to smart quotes" do
|
||||||
markdown = Converters::Markdown.new(@config)
|
markdown = Converters::Markdown.new(@config)
|
||||||
assert_equal "<p>“Pit’hy”</p>", markdown.convert(%{"Pit'hy"}).strip
|
assert_match /<p>(“|“)Pit(’|’)hy(”|”)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
|
||||||
|
|
||||||
override = { 'kramdown' => { 'smart_quotes' => 'lsaquo,rsaquo,laquo,raquo' } }
|
override = { 'kramdown' => { 'smart_quotes' => 'lsaquo,rsaquo,laquo,raquo' } }
|
||||||
markdown = Converters::Markdown.new(@config.deep_merge(override))
|
markdown = Converters::Markdown.new(@config.deep_merge(override))
|
||||||
assert_equal "<p>«Pit›hy»</p>", markdown.convert(%{"Pit'hy"}).strip
|
assert_match /<p>(«|«)Pit(›|›)hy(»|»)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue