test/test_csv.rb in statsample-0.6.7 vs test/test_csv.rb in statsample-0.7.0
- old
+ new
@@ -1,16 +1,16 @@
$:.unshift(File.dirname(__FILE__)+'/../lib/')
require 'statsample'
require "tempfile"
-require 'test/unit'
-
-class StatsampleCSVTestCase < Test::Unit::TestCase
+require 'minitest/unit'
+MiniTest::Unit.autorun
+class StatsampleCSVTestCase < MiniTest::Unit::TestCase
def setup
@ds=Statsample::CSV.read(File.dirname(__FILE__)+"/test_csv.csv")
end
def test_read
assert_equal(6,@ds.cases)
- assert_equal(%w{id name age city a1},@ds.fields)
+ assert_equal(%w{id name age city a1}, @ds.fields)
id=[1,2,3,4,5,6].to_vector(:scale)
name=["Alex","Claude","Peter","Franz","George","Fernand"].to_vector(:nominal)
age=[20,23,25,27,5.5,nil].to_vector(:scale)
city=["New York","London","London","Paris","Tome",nil].to_vector(:nominal)
a1=["a,b","b,c","a",nil,"a,b,c",nil].to_vector(:nominal)
\ No newline at end of file