Sha256: 5e9d3bc28c5330b7191058124e05273fb337d9cf2eb426e45fffd2e5a187a3b1
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
require 'test_helper' class XmlhasherTest < Test::Unit::TestCase def test_configure_settings_all_on configurable = XmlHasher.configure do |config| config.snakecase = true config.ignore_namespaces = true end assert_equal true, configurable.instance_variable_get(:'@snakecase') assert_equal true, configurable.instance_variable_get(:'@ignore_namespaces') end def test_configure_settings_all_off configurable = XmlHasher.configure do |config| config.snakecase = false config.ignore_namespaces = false end assert_equal false, configurable.instance_variable_get(:'@snakecase') assert_equal false, configurable.instance_variable_get(:'@ignore_namespaces') end def test_parser parser = XmlHasher.parser assert_equal XmlHasher::Parser, parser.class result = parser.parse(fixture('institution.xml').read) assert_not_empty result assert_equal Hash, result.class end def test_parse result = XmlHasher.parse(fixture('institution.xml').read) assert_not_empty result assert_equal Hash, result.class end end
Version data entries
4 entries across 4 versions & 1 rubygems