Sha256: 81f3cffb90996cb07dcbded4fa2a2cb3fc0f644d3005bd31ed95317b7c310f2c
Contents?: true
Size: 981 Bytes
Versions: 2
Compression:
Stored size: 981 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "ImportEverything" do describe XmlParser do before do @parser = XmlParser.new(:filename => "/Code/orig/import_everything_all/import_everything/spec/players.xml", :root_path => 'top', :table_paths => [['players','player'],['cities','city']]) #@parser.table_paths = nil end it 'smoke' do 2.should == 2 end it 'parsers' do @parser.parsers end it 'row count' do @parser.value_hashes.should size(4) @parser.cleaned_row_hashes.should size(4) end it 'first doc' do @parser.parsers.first.cleaned_value_hashes.first.should == pujols_value_hash end it 'hashes' do @parser.parsers.first.cleaned_value_hashes end it 'city' do @parser.cleaned_row_hashes.first.should == pujols_row_hash @parser.cleaned_row_hashes.last.should == {:table => 'cities', :values => {'name' => 'Madison'}} end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
import_everything-0.1.3 | spec/xml_parser_spec.rb |
import_everything-0.1.2 | spec/xml_parser_spec.rb |