Add tests in all the time that was omitted for Ruby 1.8.x
This commit is contained in:
parent
b4b6df5b6c
commit
f14c9db282
|
@ -36,16 +36,14 @@ class TestConvertible < Test::Unit::TestCase
|
||||||
assert_no_match /undefined class\/module DoesNotExist/, out
|
assert_no_match /undefined class\/module DoesNotExist/, out
|
||||||
end
|
end
|
||||||
|
|
||||||
if RUBY_VERSION >= '1.9.2'
|
should "not parse if there is encoding error in file" do
|
||||||
should "not parse if there is encoding error in file" do
|
name = 'broken_front_matter3.erb'
|
||||||
name = 'broken_front_matter3.erb'
|
out = capture_stdout do
|
||||||
out = capture_stdout do
|
ret = @convertible.read_yaml(@base, name, :encoding => 'utf-8')
|
||||||
ret = @convertible.read_yaml(@base, name, :encoding => 'utf-8')
|
assert_equal({}, ret)
|
||||||
assert_equal({}, ret)
|
|
||||||
end
|
|
||||||
assert_match(/invalid byte sequence in UTF-8/, out)
|
|
||||||
assert_match(/#{File.join(@base, name)}/, out)
|
|
||||||
end
|
end
|
||||||
|
assert_match(/invalid byte sequence in UTF-8/, out)
|
||||||
|
assert_match(/#{File.join(@base, name)}/, out)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue