spec/unit/to_xml_spec.rb in dm-serializer-0.9.3 vs spec/unit/to_xml_spec.rb in dm-serializer-0.9.4

- old
+ new

@@ -6,14 +6,14 @@ # ==== enterprisey XML # before(:all) do query = DataMapper::Query.new(DataMapper::repository(:default), Cow) - + @time = DateTime.now - + @collection = DataMapper::Collection.new(query) do |c| c.load([1, 2, 'Betsy', 'Jersey']) c.load([10, 20, 'Berta', 'Guernsey']) end @@ -53,16 +53,16 @@ <breed>Guernsey</breed> </cow> </cows> EOS end - + describe "multiple repositories" do before(:all) do QuantumCat.auto_migrate! repository(:alternate){QuantumCat.auto_migrate!} end - + it "should use the repsoitory for the model" do gerry = QuantumCat.create(:name => "gerry") george = repository(:alternate){QuantumCat.create(:name => "george", :is_dead => false)} gerry.to_xml.should_not match(/is_dead/) george.to_xml.should match(/is_dead/)