class TestHeaderToAttr

Public Instance Methods

test_leading_digit() click to toggle source
# File test/test_header_to_attr.rb, line 28
def test_leading_digit
  assert_equal(:_9header, CSVobj.header_to_attr('9header'))
end
test_lowercase() click to toggle source
# File test/test_header_to_attr.rb, line 8
def test_lowercase
  assert_equal(:header, CSVobj.header_to_attr('HEADER'))
end
test_no_repeated_adjacent_underscores() click to toggle source
# File test/test_header_to_attr.rb, line 24
def test_no_repeated_adjacent_underscores
  assert_equal(:hea_der, CSVobj.header_to_attr('hea^&*der'))
end
test_remove_leading_whitespace() click to toggle source
# File test/test_header_to_attr.rb, line 12
def test_remove_leading_whitespace
  assert_equal(:header, CSVobj.header_to_attr(' header'))
end
test_remove_trailing_whitespace() click to toggle source
# File test/test_header_to_attr.rb, line 16
def test_remove_trailing_whitespace
  assert_equal(:header, CSVobj.header_to_attr('header '))
end
test_substitute_underscore_for_non_word_char() click to toggle source
# File test/test_header_to_attr.rb, line 20
def test_substitute_underscore_for_non_word_char
  assert_equal(:_hea_der_, CSVobj.header_to_attr('^hea&der('))
end