From a853facea2a06584366c22257ee0888a41da90da Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 20 Nov 2015 08:49:32 -0500 Subject: [PATCH] Fix uniqueness issues with Faker --- spec/factories/subcreddit_factory.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/factories/subcreddit_factory.rb b/spec/factories/subcreddit_factory.rb index e5fe720..73e86a5 100644 --- a/spec/factories/subcreddit_factory.rb +++ b/spec/factories/subcreddit_factory.rb @@ -1,6 +1,6 @@ FactoryGirl.define do factory :subcreddit do owner { create(:user) } - name { Faker::Team.name.first(21) } # 21 is the max length...brittle + sequence(:name) { |n| Faker::Team.name.first(18) + "#{n}" } end end