Sha256: 824cdcfa4152d44293e5b9f1150061d77ee2f490f4a5d217744ece60f6cf69cf
Contents?: true
Size: 695 Bytes
Versions: 2
Compression:
Stored size: 695 Bytes
Contents
require 'test/unit' require 'ccsv' require 'csv' class TestCcsv < Test::Unit::TestCase def setup @dir = "#{File.dirname(__FILE__)}/../" end def test_should_raise assert_raises(RuntimeError) do Ccsv.foreach('fdssfd') do end end end def test_accuracy ccsv = [] file = @dir + "data_small.csv" Ccsv.foreach(file) do |values| ccsv << values.dup end csv = [] CSV.foreach(file) do |values| csv << values end assert_equal csv, ccsv end def test_speed start = Time.now Ccsv.foreach(@dir + "data.csv") do |values| end dur = Time.now - start puts "\n#{dur} seconds\n" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ccsv-0.0.1 | test/unit/test_ccsv.rb |
ccsv-0.0.2 | test/unit/test_ccsv.rb |