spec/happymapper_spec.rb in jimmyz-happymapper-0.3.1 vs spec/happymapper_spec.rb in jimmyz-happymapper-0.3.2

- old
+ new

@@ -637,9 +637,17 @@ doc.should have_nodes("/posts",1) doc.should have_nodes("/posts/post",0) doc.should have_nodes("/posts/@user",0) end + it "should not serialize elements that are nil" do + ft = FamilySearch::FamilyTree.new + #ft has nil persons element should not raise error + lambda{ + ft.to_xml + }.should_not raise_error + end + describe "with namespace url and prefix" do before(:all) do ft = FamilySearch::FamilyTree.parse(fixture_file('family_tree.xml')) xml = ft.to_xml @doc = REXML::Document.new xml