From 46653b9154b44c6e68924d487313728aea069cdd Mon Sep 17 00:00:00 2001 From: yafeilee Date: Mon, 22 Apr 2019 22:07:17 +0800 Subject: [PATCH] fix error --- spec/factories/comments.rb | 12 ++++++------ spec/factories/labels.rb | 2 +- spec/factories/posts.rb | 6 +++--- spec/factories/subscribes.rb | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb index f25e8cf..b836099 100644 --- a/spec/factories/comments.rb +++ b/spec/factories/comments.rb @@ -1,14 +1,14 @@ FactoryBot.define do factory :comment do - content 'content' * 10 - name 'commentor' - email 'tester@xx.com' + content { 'content' * 10 } + name { 'commentor' } + email { 'tester@xx.com' } association :post end factory :comment_no_post, class: Comment do - content 'content' * 10 - name 'commentor' - email 'tester@xx.com' + content { 'content' * 10 } + name { 'commentor' } + email { 'tester@xx.com' } end end diff --git a/spec/factories/labels.rb b/spec/factories/labels.rb index 4c4d849..59b9579 100644 --- a/spec/factories/labels.rb +++ b/spec/factories/labels.rb @@ -1,5 +1,5 @@ FactoryBot.define do factory :label do - name 'label' + name { 'label' } end end diff --git a/spec/factories/posts.rb b/spec/factories/posts.rb index 6227d92..f3b0384 100644 --- a/spec/factories/posts.rb +++ b/spec/factories/posts.rb @@ -1,12 +1,12 @@ FactoryBot.define do factory :post do - title 'this is a post title' - content 'content' * 10 + title { 'this is a post title' } + content { 'content' * 10 } end factory :post_list, class: Post do sequence(:title) { |n| "#{n}: post title" } - content 'content' * 10 + content { 'content' * 10 } sequence(:created_at) { |n| n.days.ago } end end diff --git a/spec/factories/subscribes.rb b/spec/factories/subscribes.rb index 177a89b..fe24afe 100644 --- a/spec/factories/subscribes.rb +++ b/spec/factories/subscribes.rb @@ -2,7 +2,7 @@ FactoryBot.define do factory :subscribe do - email "tester@mail.com" - enable false + email { "tester@mail.com" } + enable { false } end end