spec/public/to_csv_spec.rb in dm-serializer-0.9.9 vs spec/public/to_csv_spec.rb in dm-serializer-0.9.10
- old
+ new
@@ -26,11 +26,11 @@
peter.to_csv.chomp.split(',')[0..3].should == ['44','344','Peter','Long Horn']
end
it "should serialize a collection to CSV" do
result = @collection.to_csv.gsub(/[[:space:]]+\n/, "\n")
- result.to_a[0].split(',')[0..3].should == ['1','2','Betsy','Jersey']
- result.to_a[1].split(',')[0..3].should == ['10','20','Berta','Guernsey']
+ result.split("\n")[0].split(',')[0..3].should == ['1','2','Betsy','Jersey']
+ result.split("\n")[1].split(',')[0..3].should == ['10','20','Berta','Guernsey']
end
describe "multiple repositories" do
before(:all) do
QuanTum::Cat.auto_migrate!