From 57906e6f8bf402feb6f823ef5a2bac1cbf95b867 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 6 Sep 2013 16:01:00 +1000 Subject: [PATCH] Fix seed failure due to ShippingMethod factory creating an enterprise, preventing enterprises from being seeded --- lib/tasks/dev.rake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index 97685544a8..a2f700f5b6 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -18,7 +18,6 @@ namespace :openfoodweb do FactoryGirl.create(:shipping_method, :zone => zone) end - # -- Taxonomies unless Spree::Taxonomy.find_by_name 'Products' puts "[#{task_name}] Seeding taxonomies" @@ -51,9 +50,8 @@ namespace :openfoodweb do end # -- Enterprises - unless Enterprise.count > 0 + unless Enterprise.count > 1 puts "[#{task_name}] Seeding enterprises" - Enterprise.delete_all 3.times { FactoryGirl.create(:supplier_enterprise, :address => Spree::Address.find_by_zipcode("3160")) }