Sha256: 670ecf6d9b063dde2e5f744f9cc0ecc61da28429284ab79846f1f517b334fd87
Contents?: true
Size: 690 Bytes
Versions: 16
Compression:
Stored size: 690 Bytes
Contents
# encoding: utf-8 ### # to run use # ruby -I ./lib -I ./test test/test_csv_reader.rb require 'helper' class TestCsvReader < MiniTest::Test def test_parse recs = parse_csv( <<TXT ) ### World Countries key, fifa, name af, AFG, Afghanistan al, ALB, Albania dz, ALG, Algeria as, ASA, American Samoa (US) TXT pp recs assert_equal [{ key:'af', fifa:'AFG', name:'Afghanistan'}, { key:'al', fifa:'ALB', name:'Albania'}, { key:'dz', fifa:'ALG', name:'Algeria'}, { key:'as', fifa:'ASA', name:'American Samoa (US)'}, ], recs[0..3] end end # class TestCsvReader
Version data entries
16 entries across 16 versions & 1 rubygems