diff --git a/.rubocop.yml b/.rubocop.yml index 887da4cf0..82dd6e4b1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -417,3 +417,6 @@ Style/SafeNavigation: Style/StringLiterals: EnforcedStyle: double_quotes + +Style/StringLiteralsInInterpolation: + EnforcedStyle: double_quotes diff --git a/db/dev_seeds/polls.rb b/db/dev_seeds/polls.rb index 5a3feb64d..e26c99d7d 100644 --- a/db/dev_seeds/polls.rb +++ b/db/dev_seeds/polls.rb @@ -59,7 +59,7 @@ section "Creating Poll Questions & Answers" do end question.save! Faker::Lorem.words((2..4).to_a.sample).each_with_index do |title, index| - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" answer = Poll::Question::Answer.new(question: question, title: title.capitalize, description: description, diff --git a/spec/features/admin/poll/booth_assigments_spec.rb b/spec/features/admin/poll/booth_assigments_spec.rb index b1e5b2463..6200837ae 100644 --- a/spec/features/admin/poll/booth_assigments_spec.rb +++ b/spec/features/admin/poll/booth_assigments_spec.rb @@ -194,13 +194,13 @@ describe "Admin booths assignments" do end within("#recounts_list") do - within("#recounting_#{poll.starts_at.to_date.strftime('%Y%m%d')}") do + within("#recounting_#{poll.starts_at.to_date.strftime("%Y%m%d")}") do expect(page).to have_content 1 end - within("#recounting_#{(poll.ends_at.to_date - 5.days).strftime('%Y%m%d')}") do + within("#recounting_#{(poll.ends_at.to_date - 5.days).strftime("%Y%m%d")}") do expect(page).to have_content "-" end - within("#recounting_#{poll.ends_at.to_date.strftime('%Y%m%d')}") do + within("#recounting_#{poll.ends_at.to_date.strftime("%Y%m%d")}") do expect(page).to have_content 1 end end diff --git a/spec/mailers/dashboard/mailer_spec.rb b/spec/mailers/dashboard/mailer_spec.rb index 2bc2dd047..9feb6836b 100644 --- a/spec/mailers/dashboard/mailer_spec.rb +++ b/spec/mailers/dashboard/mailer_spec.rb @@ -197,9 +197,9 @@ describe Dashboard::Mailer do "among other features and rewards that you will discover. "\ "Dont stop adding support and we will not stop rewarding "\ "and helping you!") - expect(email).to have_body_text("You have #{Setting['months_to_archive_proposals']} months "\ + expect(email).to have_body_text("You have #{Setting["months_to_archive_proposals"]} months "\ "since you publish the proposal to get "\ - "#{Setting['votes_for_proposal_success']} support and your "\ + "#{Setting["votes_for_proposal_success"]} support and your "\ "proposal can become a reality. But the first days are the "\ "most important. It is a challenge. Get ready!") expect(email).to have_body_text("And for you to start with all the motivation,") diff --git a/spec/models/proposal_spec.rb b/spec/models/proposal_spec.rb index 3cc07c438..7a2a89ac7 100644 --- a/spec/models/proposal_spec.rb +++ b/spec/models/proposal_spec.rb @@ -128,7 +128,7 @@ describe Proposal do it "has a code" do Setting["proposal_code_prefix"] = "TEST" proposal = create(:proposal) - expect(proposal.code).to eq "TEST-#{proposal.created_at.strftime('%Y-%m')}-#{proposal.id}" + expect(proposal.code).to eq "TEST-#{proposal.created_at.strftime("%Y-%m")}-#{proposal.id}" Setting["proposal_code_prefix"] = "MAD" end