Sha256: da4a125cd0be0c1dc6e7b2190e5d4018f35cae8d52b079d856cb5f7c515d6028
Contents?: true
Size: 954 Bytes
Versions: 1
Compression:
Stored size: 954 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "ImportEverything" do describe XmlParser do before do @parser = XmlParser.new(:filename => "/Code/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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
import_everything-0.1.0 | spec/xml_parser_spec.rb |