class TestHeaders

Public Instance Methods

setup() click to toggle source
# File test/test_headers.rb, line 8
def setup
  @parser = Class.new(CSVobj)
end
teardown() click to toggle source
# File test/test_headers.rb, line 12
def teardown
  @parser = nil 
end
test_not_mangled() click to toggle source
# File test/test_headers.rb, line 22
def test_not_mangled
  s = 'Header one,!Header two'
  objs = @parser.parse(s)
  assert_equal([ 'Header one', '!Header two' ], @parser.headers)
end
test_simple() click to toggle source
# File test/test_headers.rb, line 16
def test_simple
  s = 'foo,bar,baz'
  objs = @parser.parse(s)
  assert_equal(%w[ foo bar baz ], @parser.headers)
end