diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-23 19:37:14 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-03 19:54:48 +0300 |
commit | 169dc4cec1f45cdcc548e3e682e4fd6f4c98926a (patch) | |
tree | bcf157ecd3f15f27ddb55fabebad1a8842c2bcc1 /spec/factories/snippets.rb | |
parent | 5f7cb26394921535a6e1e15f3baee7666c3ef654 (diff) |
Fix brittle specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/factories/snippets.rb')
-rw-r--r-- | spec/factories/snippets.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/factories/snippets.rb b/spec/factories/snippets.rb index fb87c584f0b..18cb0f5de26 100644 --- a/spec/factories/snippets.rb +++ b/spec/factories/snippets.rb @@ -1,12 +1,9 @@ FactoryGirl.define do - sequence(:title, aliases: [:content]) { |n| "My snippet #{n}" } - sequence(:file_name) { |n| "snippet-#{n}.rb" } - factory :snippet do author - title - content - file_name + title { generate(:title) } + content { generate(:title) } + file_name { generate(:filename) } trait :public do visibility_level Snippet::PUBLIC |