From d8fa30ea6fbe3213a7fa5310e349e7b237536889 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 21 May 2014 16:54:26 +1000 Subject: [PATCH] Add a sequence to option type position, prevents inconsistent ordering in specs --- spec/factories.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/factories.rb b/spec/factories.rb index b2ed52b7a7..6da7824d47 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -190,6 +190,10 @@ FactoryGirl.modify do distributors { [Enterprise.is_distributor.first || FactoryGirl.create(:distributor_enterprise)] } end + factory :option_type do + # Prevent inconsistent ordering in specs when all option types have the same (0) position + sequence(:position) + end end