From f14c9db282816a7cde7f764e625b2e078da6cac9 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 8 Dec 2013 00:48:25 -0500 Subject: [PATCH] Add tests in all the time that was omitted for Ruby 1.8.x --- test/test_convertible.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/test/test_convertible.rb b/test/test_convertible.rb index 694c152c..c7ad9b9a 100644 --- a/test/test_convertible.rb +++ b/test/test_convertible.rb @@ -36,16 +36,14 @@ class TestConvertible < Test::Unit::TestCase assert_no_match /undefined class\/module DoesNotExist/, out end - if RUBY_VERSION >= '1.9.2' - should "not parse if there is encoding error in file" do - name = 'broken_front_matter3.erb' - out = capture_stdout do - ret = @convertible.read_yaml(@base, name, :encoding => 'utf-8') - assert_equal({}, ret) - end - assert_match(/invalid byte sequence in UTF-8/, out) - assert_match(/#{File.join(@base, name)}/, out) + should "not parse if there is encoding error in file" do + name = 'broken_front_matter3.erb' + out = capture_stdout do + ret = @convertible.read_yaml(@base, name, :encoding => 'utf-8') + assert_equal({}, ret) end + assert_match(/invalid byte sequence in UTF-8/, out) + assert_match(/#{File.join(@base, name)}/, out) end end end