Sha256: 8cc9eef0461006f7b88c8e87b920cd8a4ab4bea0648c341ba3528dfa3784d67e
Contents?: true
Size: 899 Bytes
Versions: 1
Compression:
Stored size: 899 Bytes
Contents
# -*- coding: utf-8 -*- require "sixarm_ruby_ramp_test" require "sixarm_ruby_ramp/io" class IOTest < Minitest::Test def test_load_dir_files dirpath=File.join(__dir__,'io_test*') expect=[File.join(__dir__,'io_test.rb'),File.join(__dir__,'io_test.txt')] actual=Dir[dirpath].sort assert_equal(expect,actual,"Dir[#{dirpath}] expects test data files") end def test_readrow filename=Dir[File.join(__dir__,'io_test.txt')].first f=File.open(filename) assert_equal(["A1","B1","C1"],f.readrow(:row=>"=",:col=>"-")) assert_equal(["A2","B2","C2"],f.readrow(:row=>"=",:col=>"-")) assert_equal(["A3","B3","C3"],f.readrow(:row=>"=",:col=>"-")) end def test_readrows filename=Dir[File.join(__dir__,'io_test.txt')].first expect=[["A1","B1","C1"],["A2","B2","C2"],["A3","B3","C3"]] actual=IO.readrows(filename,:row=>"=",:col=>"-") assert_equal(expect,actual) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sixarm_ruby_ramp-4.2.4 | test/sixarm_ruby_ramp_test/io_test.rb |