diff --git a/test/csv/test_interface.rb b/test/csv/test_interface.rb index 04d0edc5f1..a58e9c6179 100644 --- a/test/csv/test_interface.rb +++ b/test/csv/test_interface.rb @@ -167,14 +167,14 @@ class TestCSVInterface < Test::Unit::TestCase File.unlink(@path) lines = [{a: 1, b: 2, c: 3}, {a: 4, b: 5, c: 6}] - CSV.open( @path, "w", headers: true, - header_converters: :symbol ) do |csv| + CSV.open( @path, "wb", headers: true, + header_converters: :symbol ) do |csv| csv << lines.first.keys lines.each { |line| csv << line } end - CSV.open( @path, "r", headers: true, - converters: :all, - header_converters: :symbol ) do |csv| + CSV.open( @path, "rb", headers: true, + converters: :all, + header_converters: :symbol ) do |csv| csv.each { |line| assert_equal(lines.shift, line.to_hash) } end end diff --git a/test/dl/test_func.rb b/test/dl/test_func.rb index 3900af3d5f..ab8353bd76 100644 --- a/test/dl/test_func.rb +++ b/test/dl/test_func.rb @@ -22,8 +22,12 @@ module DL end def test_sinf - f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'), - [TYPE_FLOAT]) + begin + f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'), + [TYPE_FLOAT]) + rescue DL::DLError + skip "libm may not have sinf()" + end assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001 end diff --git a/test/win32ole/test_folderitem2_invokeverb.rb b/test/win32ole/test_folderitem2_invokeverb.rb index e5380cacf7..89da49772c 100644 --- a/test/win32ole/test_folderitem2_invokeverb.rb +++ b/test/win32ole/test_folderitem2_invokeverb.rb @@ -64,7 +64,7 @@ if defined?(WIN32OLE) # is found in context menu, if @shortcut links = find_link(@dummy_path) - assert(0, links.size) + assert_equal(0, links.size) # Now create shortcut to @dummy_path arg = WIN32OLE_VARIANT.new(@shortcut) @@ -72,7 +72,7 @@ if defined?(WIN32OLE) # Now search shortcut to @dummy_path links = find_link(@dummy_path) - assert(1, links.size) + assert_equal(1, links.size) @lpath = links[0].path end end