diff --git a/.rubocop.yml b/.rubocop.yml
index 20182a149..27e3b1624 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -518,6 +518,9 @@ RSpec/ExampleWording:
RSpec/ExcessiveDocstringSpacing:
Enabled: true
+RSpec/FactoryBot/ConsistentParenthesesStyle:
+ Enabled: true
+
RSpec/FactoryBot/FactoryClassName:
Enabled: true
diff --git a/spec/controllers/admin/api/stats_controller_spec.rb b/spec/controllers/admin/api/stats_controller_spec.rb
index 042d1d3d1..ee9fd7605 100644
--- a/spec/controllers/admin/api/stats_controller_spec.rb
+++ b/spec/controllers/admin/api/stats_controller_spec.rb
@@ -17,12 +17,12 @@ describe Admin::Api::StatsController, :admin do
time_2 = Time.zone.local(2015, 01, 02)
time_3 = Time.zone.local(2015, 01, 03)
- create :ahoy_event, name: "foo", time: time_1
- create :ahoy_event, name: "foo", time: time_1
- create :ahoy_event, name: "foo", time: time_2
- create :ahoy_event, name: "bar", time: time_1
- create :ahoy_event, name: "bar", time: time_3
- create :ahoy_event, name: "bar", time: time_3
+ create(:ahoy_event, name: "foo", time: time_1)
+ create(:ahoy_event, name: "foo", time: time_1)
+ create(:ahoy_event, name: "foo", time: time_2)
+ create(:ahoy_event, name: "bar", time: time_1)
+ create(:ahoy_event, name: "bar", time: time_3)
+ create(:ahoy_event, name: "bar", time: time_3)
end
it "returns single events formated for working with c3.js" do
@@ -38,9 +38,9 @@ describe Admin::Api::StatsController, :admin do
time_1 = Time.zone.local(2015, 01, 01)
time_2 = Time.zone.local(2015, 01, 02)
- create :visit, started_at: time_1
- create :visit, started_at: time_1
- create :visit, started_at: time_2
+ create(:visit, started_at: time_1)
+ create(:visit, started_at: time_1)
+ create(:visit, started_at: time_2)
get :show, params: { visits: true }
diff --git a/spec/helpers/geozones_helper_spec.rb b/spec/helpers/geozones_helper_spec.rb
index b89706bdb..0d848f212 100644
--- a/spec/helpers/geozones_helper_spec.rb
+++ b/spec/helpers/geozones_helper_spec.rb
@@ -2,7 +2,7 @@ require "rails_helper"
describe GeozonesHelper do
describe "#geozone_name" do
- let(:geozone) { create :geozone }
+ let(:geozone) { create(:geozone) }
it "returns geozone name if present" do
proposal = create(:proposal, geozone: geozone)
diff --git a/spec/models/ahoy/data_source_spec.rb b/spec/models/ahoy/data_source_spec.rb
index b72f3d728..df8d2756d 100644
--- a/spec/models/ahoy/data_source_spec.rb
+++ b/spec/models/ahoy/data_source_spec.rb
@@ -7,12 +7,12 @@ describe Ahoy::DataSource do
time_2 = Time.zone.local(2015, 01, 02)
time_3 = Time.zone.local(2015, 01, 03)
- create :ahoy_event, name: "foo", time: time_1
- create :ahoy_event, name: "foo", time: time_1
- create :ahoy_event, name: "foo", time: time_2
- create :ahoy_event, name: "bar", time: time_1
- create :ahoy_event, name: "bar", time: time_3
- create :ahoy_event, name: "bar", time: time_3
+ create(:ahoy_event, name: "foo", time: time_1)
+ create(:ahoy_event, name: "foo", time: time_1)
+ create(:ahoy_event, name: "foo", time: time_2)
+ create(:ahoy_event, name: "bar", time: time_1)
+ create(:ahoy_event, name: "bar", time: time_3)
+ create(:ahoy_event, name: "bar", time: time_3)
end
it "works without data sources" do
diff --git a/spec/models/dashboard/action_spec.rb b/spec/models/dashboard/action_spec.rb
index 5a10ffdd4..b792dc950 100644
--- a/spec/models/dashboard/action_spec.rb
+++ b/spec/models/dashboard/action_spec.rb
@@ -2,13 +2,13 @@ require "rails_helper"
describe Dashboard::Action do
subject do
- build :dashboard_action,
+ build(:dashboard_action,
title: "Take action!",
description: description,
day_offset: day_offset,
required_supports: required_supports,
request_to_administrators: request_to_administrators,
- action_type: action_type
+ action_type: action_type)
end
let(:description) { Faker::Lorem.sentence }
@@ -150,34 +150,34 @@ describe Dashboard::Action do
end
describe ".active_for" do
- let!(:active_action) { create :dashboard_action, :active, day_offset: 0, required_supports: 0 }
- let!(:inactive_action) { create :dashboard_action, :inactive }
+ let!(:active_action) { create(:dashboard_action, :active, day_offset: 0, required_supports: 0) }
+ let!(:inactive_action) { create(:dashboard_action, :inactive) }
let!(:not_enough_supports_action) do
- create :dashboard_action, :active, day_offset: 0, required_supports: 10_000
+ create(:dashboard_action, :active, day_offset: 0, required_supports: 10_000)
end
let!(:future_action) do
- create :dashboard_action, :active, day_offset: 300, required_supports: 0
+ create(:dashboard_action, :active, day_offset: 300, required_supports: 0)
end
let!(:action_published_proposal) do
- create :dashboard_action,
+ create(:dashboard_action,
:active,
day_offset: 0,
required_supports: 0,
- published_proposal: true
+ published_proposal: true)
end
let!(:action_for_draft_proposal) do
- create :dashboard_action,
+ create(:dashboard_action,
:active,
day_offset: 0,
required_supports: 0,
- published_proposal: false
+ published_proposal: false)
end
- let(:proposal) { create :proposal }
- let(:draft_proposal) { create :proposal, :draft }
+ let(:proposal) { create(:proposal) }
+ let(:draft_proposal) { create(:proposal, :draft) }
it "actions with enough supports or days are active" do
expect(Dashboard::Action.active_for(proposal)).to include(active_action)
@@ -213,13 +213,13 @@ describe Dashboard::Action do
end
describe ".course_for" do
- let!(:proposed_action) { create :dashboard_action, :active, required_supports: 0 }
+ let!(:proposed_action) { create(:dashboard_action, :active, required_supports: 0) }
let!(:inactive_resource) do
- create :dashboard_action, :inactive, :resource, required_supports: 0
+ create(:dashboard_action, :inactive, :resource, required_supports: 0)
end
- let!(:resource) { create :dashboard_action, :active, :resource, required_supports: 10_000 }
- let!(:achieved_resource) { create :dashboard_action, :active, :resource, required_supports: 0 }
- let(:proposal) { create :proposal }
+ let!(:resource) { create(:dashboard_action, :active, :resource, required_supports: 10_000) }
+ let!(:achieved_resource) { create(:dashboard_action, :active, :resource, required_supports: 0) }
+ let(:proposal) { create(:proposal) }
it "proposed actions are not part of proposal's course" do
expect(Dashboard::Action.course_for(proposal)).not_to include(proposed_action)
diff --git a/spec/models/dashboard/executed_action_spec.rb b/spec/models/dashboard/executed_action_spec.rb
index 268cc6054..87a27fdfe 100644
--- a/spec/models/dashboard/executed_action_spec.rb
+++ b/spec/models/dashboard/executed_action_spec.rb
@@ -1,8 +1,8 @@
require "rails_helper"
describe Dashboard::ExecutedAction do
- let(:proposal) { create :proposal }
- let(:action) { create :dashboard_action, request_to_administrators: true }
+ let(:proposal) { create(:proposal) }
+ let(:action) { create(:dashboard_action, request_to_administrators: true) }
it "is invalid when proposal is nil" do
action = build(:dashboard_executed_action, proposal: nil)
diff --git a/spec/models/link_spec.rb b/spec/models/link_spec.rb
index 15c1bc5d0..6bd07a695 100644
--- a/spec/models/link_spec.rb
+++ b/spec/models/link_spec.rb
@@ -1,7 +1,7 @@
require "rails_helper"
describe Link do
- let(:action) { build :dashboard_action }
+ let(:action) { build(:dashboard_action) }
it "is invalid when label is blank" do
link = build(:link, linkable: action, label: "")
diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb
index 27cb7b8eb..9dc725f07 100644
--- a/spec/models/notification_spec.rb
+++ b/spec/models/notification_spec.rb
@@ -39,8 +39,8 @@ describe Notification do
describe "#recent" do
it "returns notifications sorted by id descendant" do
- old_notification = create :notification
- new_notification = create :notification
+ old_notification = create(:notification)
+ new_notification = create(:notification)
expect(Notification.recent).to eq [new_notification, old_notification]
end
@@ -80,8 +80,8 @@ describe Notification do
describe "#timestamp" do
it "returns the timestamp of the trackable object" do
- comment = create :comment
- notification = create :notification, notifiable: comment
+ comment = create(:comment)
+ notification = create(:notification, notifiable: comment)
expect(notification.timestamp).to eq comment.created_at
end
diff --git a/spec/models/poll/poll_spec.rb b/spec/models/poll/poll_spec.rb
index ac43f2c1e..dc533e0cb 100644
--- a/spec/models/poll/poll_spec.rb
+++ b/spec/models/poll/poll_spec.rb
@@ -358,8 +358,8 @@ describe Poll do
end
describe ".overlaping_with" do
- let(:proposal) { create :proposal }
- let(:other_proposal) { create :proposal }
+ let(:proposal) { create(:proposal) }
+ let(:other_proposal) { create(:proposal) }
let(:poll) { create(:poll, related: proposal) }
let(:overlaping_poll) do
build(:poll, related: proposal, starts_at: poll.starts_at + 1.day, ends_at: poll.ends_at - 1.day)
diff --git a/spec/models/poll/stats_spec.rb b/spec/models/poll/stats_spec.rb
index 4004608d0..e9c93f1f7 100644
--- a/spec/models/poll/stats_spec.rb
+++ b/spec/models/poll/stats_spec.rb
@@ -176,8 +176,8 @@ describe Poll::Stats do
hobbiton = create(:geozone, name: "Hobbiton")
rivendel = create(:geozone, name: "Rivendel")
- 3.times { create :poll_voter, poll: poll, user: create(:user, :level_two, geozone: hobbiton) }
- 2.times { create :poll_voter, poll: poll, user: create(:user, :level_two, geozone: rivendel) }
+ 3.times { create(:poll_voter, poll: poll, user: create(:user, :level_two, geozone: hobbiton)) }
+ 2.times { create(:poll_voter, poll: poll, user: create(:user, :level_two, geozone: rivendel)) }
expect(stats.participants_by_geozone["Hobbiton"][:count]).to eq 3
expect(stats.participants_by_geozone["Hobbiton"][:percentage]).to eq 60.0
diff --git a/spec/shared/system/notifiable_in_app.rb b/spec/shared/system/notifiable_in_app.rb
index c17b2166f..6efd98e0b 100644
--- a/spec/shared/system/notifiable_in_app.rb
+++ b/spec/shared/system/notifiable_in_app.rb
@@ -49,7 +49,7 @@ shared_examples "notifiable in-app" do |factory_name|
end
scenario "A user replied to my comment" do
- comment = create :comment, commentable: notifiable, user: author
+ comment = create(:comment, commentable: notifiable, user: author)
login_as(create(:user, :verified))
visit path_for(notifiable)
@@ -74,7 +74,7 @@ shared_examples "notifiable in-app" do |factory_name|
end
scenario "Multiple replies to my comment" do
- comment = create :comment, commentable: notifiable, user: author
+ comment = create(:comment, commentable: notifiable, user: author)
3.times do |n|
login_as(create(:user, :verified))
@@ -118,7 +118,7 @@ shared_examples "notifiable in-app" do |factory_name|
end
scenario "Author replied to his own comment" do
- comment = create :comment, commentable: notifiable, user: author
+ comment = create(:comment, commentable: notifiable, user: author)
login_as author
visit path_for(notifiable)
diff --git a/spec/system/admin/dashboard/actions_spec.rb b/spec/system/admin/dashboard/actions_spec.rb
index c17437b5a..83e67a171 100644
--- a/spec/system/admin/dashboard/actions_spec.rb
+++ b/spec/system/admin/dashboard/actions_spec.rb
@@ -26,7 +26,7 @@ describe "Admin dashboard actions", :admin do
end
context "and actions defined" do
- let!(:action) { create :dashboard_action }
+ let!(:action) { create(:dashboard_action) }
before do
visit admin_dashboard_actions_path
@@ -39,7 +39,7 @@ describe "Admin dashboard actions", :admin do
end
context "when creating an action" do
- let(:action) { build :dashboard_action }
+ let(:action) { build(:dashboard_action) }
before do
visit admin_dashboard_actions_path
@@ -63,7 +63,7 @@ describe "Admin dashboard actions", :admin do
end
context "when editing an action" do
- let!(:action) { create :dashboard_action }
+ let!(:action) { create(:dashboard_action) }
before do
visit admin_dashboard_actions_path
@@ -87,7 +87,7 @@ describe "Admin dashboard actions", :admin do
end
context "when destroying an action" do
- let!(:action) { create :dashboard_action }
+ let!(:action) { create(:dashboard_action) }
before do
visit admin_dashboard_actions_path
diff --git a/spec/system/admin/dashboard/administrator_tasks_spec.rb b/spec/system/admin/dashboard/administrator_tasks_spec.rb
index 68717b2b0..e61dd5e6f 100644
--- a/spec/system/admin/dashboard/administrator_tasks_spec.rb
+++ b/spec/system/admin/dashboard/administrator_tasks_spec.rb
@@ -13,7 +13,7 @@ describe "Admin administrator tasks", :admin do
end
context "and actions defined" do
- let!(:task) { create :dashboard_administrator_task, :pending }
+ let!(:task) { create(:dashboard_administrator_task, :pending) }
before do
visit admin_dashboard_administrator_tasks_path
@@ -31,7 +31,7 @@ describe "Admin administrator tasks", :admin do
end
context "when solving a task" do
- let!(:task) { create :dashboard_administrator_task, :pending }
+ let!(:task) { create(:dashboard_administrator_task, :pending) }
before do
visit admin_dashboard_administrator_tasks_path
diff --git a/spec/system/comments/budget_investments_spec.rb b/spec/system/comments/budget_investments_spec.rb
index 28f8dea6e..f0c39c266 100644
--- a/spec/system/comments/budget_investments_spec.rb
+++ b/spec/system/comments/budget_investments_spec.rb
@@ -1,8 +1,8 @@
require "rails_helper"
describe "Commenting Budget::Investments" do
- let(:user) { create :user }
- let(:investment) { create :budget_investment }
+ let(:user) { create(:user) }
+ let(:investment) { create(:budget_investment) }
it_behaves_like "flaggable", :budget_investment_comment
@@ -159,7 +159,7 @@ describe "Commenting Budget::Investments" do
end
scenario "Turns links into html links" do
- create :comment, commentable: investment, body: "Built with http://rubyonrails.org/"
+ create(:comment, commentable: investment, body: "Built with http://rubyonrails.org/")
visit budget_investment_path(investment.budget, investment)
@@ -172,10 +172,10 @@ describe "Commenting Budget::Investments" do
end
scenario "Sanitizes comment body for security" do
- create :comment, commentable: investment,
+ create(:comment, commentable: investment,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit budget_investment_path(investment.budget, investment)
diff --git a/spec/system/comments/debates_spec.rb b/spec/system/comments/debates_spec.rb
index b3d846f59..b6550b3d9 100644
--- a/spec/system/comments/debates_spec.rb
+++ b/spec/system/comments/debates_spec.rb
@@ -1,8 +1,8 @@
require "rails_helper"
describe "Commenting debates" do
- let(:user) { create :user }
- let(:debate) { create :debate }
+ let(:user) { create(:user) }
+ let(:debate) { create(:debate) }
it_behaves_like "flaggable", :debate_comment
@@ -162,7 +162,7 @@ describe "Commenting debates" do
end
scenario "Turns links into html links" do
- create :comment, commentable: debate, body: "Built with http://rubyonrails.org/"
+ create(:comment, commentable: debate, body: "Built with http://rubyonrails.org/")
visit debate_path(debate)
@@ -175,10 +175,10 @@ describe "Commenting debates" do
end
scenario "Sanitizes comment body for security" do
- create :comment, commentable: debate,
+ create(:comment, commentable: debate,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit debate_path(debate)
diff --git a/spec/system/comments/legislation_annotations_spec.rb b/spec/system/comments/legislation_annotations_spec.rb
index 0e409c55b..aae580f14 100644
--- a/spec/system/comments/legislation_annotations_spec.rb
+++ b/spec/system/comments/legislation_annotations_spec.rb
@@ -1,8 +1,8 @@
require "rails_helper"
describe "Commenting legislation questions" do
- let(:user) { create :user }
- let(:annotation) { create :legislation_annotation, author: user }
+ let(:user) { create(:user) }
+ let(:annotation) { create(:legislation_annotation, author: user) }
it_behaves_like "flaggable", :legislation_annotation_comment
@@ -155,7 +155,7 @@ describe "Commenting legislation questions" do
end
scenario "Turns links into html links" do
- annotation = create :legislation_annotation, author: user
+ annotation = create(:legislation_annotation, author: user)
annotation.comments << create(:comment, body: "Built with http://rubyonrails.org/")
visit polymorphic_path(annotation)
@@ -169,10 +169,10 @@ describe "Commenting legislation questions" do
end
scenario "Sanitizes comment body for security" do
- create :comment, commentable: annotation,
+ create(:comment, commentable: annotation,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit polymorphic_path(annotation)
diff --git a/spec/system/comments/legislation_questions_spec.rb b/spec/system/comments/legislation_questions_spec.rb
index bec16a685..6cc9c3685 100644
--- a/spec/system/comments/legislation_questions_spec.rb
+++ b/spec/system/comments/legislation_questions_spec.rb
@@ -1,9 +1,9 @@
require "rails_helper"
describe "Commenting legislation questions" do
- let(:user) { create :user, :level_two }
- let(:process) { create :legislation_process, :in_debate_phase }
- let(:question) { create :legislation_question, process: process }
+ let(:user) { create(:user, :level_two) }
+ let(:process) { create(:legislation_process, :in_debate_phase) }
+ let(:question) { create(:legislation_question, process: process) }
context "Concerns" do
it_behaves_like "notifiable in-app", :legislation_question
@@ -151,7 +151,7 @@ describe "Commenting legislation questions" do
end
scenario "Turns links into html links" do
- create :comment, commentable: question, body: "Built with http://rubyonrails.org/"
+ create(:comment, commentable: question, body: "Built with http://rubyonrails.org/")
visit legislation_process_question_path(question.process, question)
@@ -164,10 +164,10 @@ describe "Commenting legislation questions" do
end
scenario "Sanitizes comment body for security" do
- create :comment, commentable: question,
+ create(:comment, commentable: question,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit legislation_process_question_path(question.process, question)
@@ -232,7 +232,7 @@ describe "Commenting legislation questions" do
end
scenario "Unverified user can't create comments" do
- unverified_user = create :user
+ unverified_user = create(:user)
login_as(unverified_user)
visit legislation_process_question_path(question.process, question)
diff --git a/spec/system/comments/polls_spec.rb b/spec/system/comments/polls_spec.rb
index 461177820..ca0708398 100644
--- a/spec/system/comments/polls_spec.rb
+++ b/spec/system/comments/polls_spec.rb
@@ -1,7 +1,7 @@
require "rails_helper"
describe "Commenting polls" do
- let(:user) { create :user }
+ let(:user) { create(:user) }
let(:poll) { create(:poll, author: create(:user)) }
scenario "Index" do
@@ -140,7 +140,7 @@ describe "Commenting polls" do
end
scenario "Turns links into html links" do
- create :comment, commentable: poll, body: "Built with http://rubyonrails.org/"
+ create(:comment, commentable: poll, body: "Built with http://rubyonrails.org/")
visit poll_path(poll)
@@ -153,10 +153,10 @@ describe "Commenting polls" do
end
scenario "Sanitizes comment body for security" do
- create :comment, commentable: poll,
+ create(:comment, commentable: poll,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit poll_path(poll)
diff --git a/spec/system/comments/proposals_spec.rb b/spec/system/comments/proposals_spec.rb
index bece16b5a..5d2f42329 100644
--- a/spec/system/comments/proposals_spec.rb
+++ b/spec/system/comments/proposals_spec.rb
@@ -1,8 +1,8 @@
require "rails_helper"
describe "Commenting proposals" do
- let(:user) { create :user }
- let(:proposal) { create :proposal }
+ let(:user) { create(:user) }
+ let(:proposal) { create(:proposal) }
it_behaves_like "flaggable", :proposal_comment
@@ -145,7 +145,7 @@ describe "Commenting proposals" do
end
scenario "Turns links into html links" do
- create :comment, commentable: proposal, body: "Built with http://rubyonrails.org/"
+ create(:comment, commentable: proposal, body: "Built with http://rubyonrails.org/")
visit proposal_path(proposal)
@@ -158,10 +158,10 @@ describe "Commenting proposals" do
end
scenario "Sanitizes comment body for security" do
- create :comment, commentable: proposal,
+ create(:comment, commentable: proposal,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit proposal_path(proposal)
diff --git a/spec/system/comments/topics_spec.rb b/spec/system/comments/topics_spec.rb
index 1fb666c05..e4a603bc7 100644
--- a/spec/system/comments/topics_spec.rb
+++ b/spec/system/comments/topics_spec.rb
@@ -1,8 +1,8 @@
require "rails_helper"
describe "Commenting topics from proposals" do
- let(:user) { create :user }
- let(:proposal) { create :proposal }
+ let(:user) { create(:user) }
+ let(:proposal) { create(:proposal) }
it_behaves_like "flaggable", :topic_with_community_comment
@@ -153,7 +153,7 @@ describe "Commenting topics from proposals" do
scenario "Turns links into html links" do
community = proposal.community
topic = create(:topic, community: community)
- create :comment, commentable: topic, body: "Built with http://rubyonrails.org/"
+ create(:comment, commentable: topic, body: "Built with http://rubyonrails.org/")
visit community_topic_path(community, topic)
@@ -168,10 +168,10 @@ describe "Commenting topics from proposals" do
scenario "Sanitizes comment body for security" do
community = proposal.community
topic = create(:topic, community: community)
- create :comment, commentable: topic,
+ create(:comment, commentable: topic,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit community_topic_path(community, topic)
@@ -574,8 +574,8 @@ describe "Commenting topics from proposals" do
end
describe "Commenting topics from budget investments" do
- let(:user) { create :user }
- let(:investment) { create :budget_investment }
+ let(:user) { create(:user) }
+ let(:investment) { create(:budget_investment) }
scenario "Index" do
community = investment.community
@@ -702,7 +702,7 @@ describe "Commenting topics from budget investments" do
scenario "Turns links into html links" do
community = investment.community
topic = create(:topic, community: community)
- create :comment, commentable: topic, body: "Built with http://rubyonrails.org/"
+ create(:comment, commentable: topic, body: "Built with http://rubyonrails.org/")
visit community_topic_path(community, topic)
@@ -717,10 +717,10 @@ describe "Commenting topics from budget investments" do
scenario "Sanitizes comment body for security" do
community = investment.community
topic = create(:topic, community: community)
- create :comment, commentable: topic,
+ create(:comment, commentable: topic,
body: " " \
"click me " \
- "http://www.url.com"
+ "http://www.url.com")
visit community_topic_path(community, topic)
diff --git a/spec/system/notifications_spec.rb b/spec/system/notifications_spec.rb
index 9046024de..0da41cdf3 100644
--- a/spec/system/notifications_spec.rb
+++ b/spec/system/notifications_spec.rb
@@ -1,7 +1,7 @@
require "rails_helper"
describe "Notifications" do
- let(:user) { create :user }
+ let(:user) { create(:user) }
before { login_as(user) }
scenario "View all" do
diff --git a/spec/system/tags/budget_investments_spec.rb b/spec/system/tags/budget_investments_spec.rb
index 8233dbcfb..f032c6041 100644
--- a/spec/system/tags/budget_investments_spec.rb
+++ b/spec/system/tags/budget_investments_spec.rb
@@ -29,7 +29,7 @@ describe "Tags" do
scenario "Index shows 3 tags with no plus link" do
tag_list = ["Medio Ambiente", "Corrupción", "Fiestas populares"]
- create :budget_investment, heading: heading, tag_list: tag_list
+ create(:budget_investment, heading: heading, tag_list: tag_list)
visit budget_investments_path(budget, heading_id: heading.id)
@@ -43,7 +43,7 @@ describe "Tags" do
scenario "Index shows up to 5 tags per investment" do
tag_list = ["Hacienda", "Economía", "Medio Ambiente", "Corrupción", "Fiestas populares", "Prensa"]
- create :budget_investment, heading: heading, tag_list: tag_list
+ create(:budget_investment, heading: heading, tag_list: tag_list)
visit budget_investments_path(budget, heading_id: heading.id)
diff --git a/spec/system/tags/debates_spec.rb b/spec/system/tags/debates_spec.rb
index efd66ec65..4c7097a31 100644
--- a/spec/system/tags/debates_spec.rb
+++ b/spec/system/tags/debates_spec.rb
@@ -18,7 +18,7 @@ describe "Tags" do
scenario "Index shows up to 5 tags per proposal" do
tag_list = ["Hacienda", "Economía", "Medio Ambiente", "Corrupción", "Fiestas populares", "Prensa"]
- create :debate, tag_list: tag_list
+ create(:debate, tag_list: tag_list)
visit debates_path
@@ -29,7 +29,7 @@ describe "Tags" do
scenario "Index shows 3 tags with no plus link" do
tag_list = ["Medio Ambiente", "Corrupción", "Fiestas populares"]
- create :debate, tag_list: tag_list
+ create(:debate, tag_list: tag_list)
visit debates_path
diff --git a/spec/system/tags/proposals_spec.rb b/spec/system/tags/proposals_spec.rb
index b6848d1e3..f6cd8ac9b 100644
--- a/spec/system/tags/proposals_spec.rb
+++ b/spec/system/tags/proposals_spec.rb
@@ -18,7 +18,7 @@ describe "Tags" do
scenario "Index shows up to 5 tags per proposal" do
tag_list = ["Hacienda", "Economía", "Medio Ambiente", "Corrupción", "Fiestas populares", "Prensa"]
- create :proposal, tag_list: tag_list
+ create(:proposal, tag_list: tag_list)
visit proposals_path
@@ -38,7 +38,7 @@ describe "Tags" do
scenario "Index shows 3 tags with no plus link" do
tag_list = ["Medio Ambiente", "Corrupción", "Fiestas populares"]
- create :proposal, tag_list: tag_list
+ create(:proposal, tag_list: tag_list)
visit proposals_path