test/test_hoe.rb in hoe-2.3.1 vs test/test_hoe.rb in hoe-2.3.2
- old
+ new
@@ -1,12 +1,21 @@
require 'minitest/autorun'
require 'hoe'
+require 'tempfile'
$rakefile = nil # shuts up a warning in rdoctask.rb
class TestHoe < MiniTest::Unit::TestCase
def setup
Rake.application.clear
+ end
+
+ def test_file_read_utf
+ Tempfile.open 'BOM' do |io|
+ io.write "\xEF\xBB\xBFBOM"
+ io.rewind
+ assert_equal 'BOM', File.read_utf(io.path)
+ end
end
def test_possibly_better
t = Gem::Specification::TODAY
hoe = Hoe.spec("blah") do