Skip to content

Commit 46ce757

Browse files
committed
Compliant with Ruby 2.0.0
1 parent fe36b0f commit 46ce757

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
language: ruby
2+
before_install:
3+
- gem install bundler
24
rvm:
5+
- 2.0.0
36
- 1.9.3
47
- 1.9.2
58
- 1.8.7

test/test_convertible.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TestConvertible < Test::Unit::TestCase
2525
ret = @convertible.read_yaml(@base, name)
2626
assert_equal({}, ret)
2727
end
28-
assert_match(/YAML Exception|syntax error/, out)
28+
assert_match(/YAML Exception|syntax error|Error reading file/, out)
2929
assert_match(/#{File.join(@base, name)}/, out)
3030
end
3131

test/test_kramdown.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
require 'helper'
24

35
class TestKramdown < Test::Unit::TestCase
@@ -23,11 +25,11 @@ class TestKramdown < Test::Unit::TestCase
2325

2426
should "convert quotes to smart quotes" do
2527
markdown = Converters::Markdown.new(@config)
26-
assert_equal "<p>&#8220;Pit&#8217;hy&#8221;</p>", markdown.convert(%{"Pit'hy"}).strip
28+
assert_match /<p>(&#8220;|“)Pit(&#8217;|’)hy(&#8221;|”)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
2729

2830
override = { 'kramdown' => { 'smart_quotes' => 'lsaquo,rsaquo,laquo,raquo' } }
2931
markdown = Converters::Markdown.new(@config.deep_merge(override))
30-
assert_equal "<p>&#171;Pit&#8250;hy&#187;</p>", markdown.convert(%{"Pit'hy"}).strip
32+
assert_match /<p>(&#171;|«)Pit(&#8250;|›)hy(&#187;|»)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
3133
end
3234
end
3335
end

0 commit comments

Comments
 (0)