diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_hoe.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_hoe.rb b/test/test_hoe.rb index e83d50c..3c5764a 100644 --- a/test/test_hoe.rb +++ b/test/test_hoe.rb @@ -104,7 +104,13 @@ class TestHoe < MiniTest::Unit::TestCase Tempfile.open 'BOM' do |io| io.write "\xEF\xBB\xBFBOM" io.rewind - assert_equal 'BOM', File.read_utf(io.path) + + content = File.read_utf io.path + assert_equal 'BOM', content + + if content.respond_to? :encoding then + assert_equal Encoding::UTF_8, content.encoding + end end end |