Enable StaticAttributeDefinedDynamically cop & fix
rubocop-rspec gem includes cops for FactoryBot like the new FactoryBot/StaticAttributeDefinedDynamically to enforce declaring static attribute values without a block. * http://www.rubydoc.info/gems/rubocop-rspec/1.24.0/RuboCop/Cop/RSpec/FactoryBot/StaticAttributeDefinedDynamically
This commit is contained in:
@@ -403,6 +403,9 @@ RSpec/VerifiedDoubles:
|
|||||||
RSpec/VoidExpect:
|
RSpec/VoidExpect:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
FactoryBot/StaticAttributeDefinedDynamically:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Security/Eval:
|
Security/Eval:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -638,13 +638,13 @@ FactoryBot.define do
|
|||||||
factory :poll_partial_result, class: 'Poll::PartialResult' do
|
factory :poll_partial_result, class: 'Poll::PartialResult' do
|
||||||
association :question, factory: [:poll_question, :with_answers]
|
association :question, factory: [:poll_question, :with_answers]
|
||||||
association :author, factory: :user
|
association :author, factory: :user
|
||||||
origin { 'web' }
|
origin 'web'
|
||||||
answer { question.question_answers.sample.title }
|
answer { question.question_answers.sample.title }
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :poll_recount, class: 'Poll::Recount' do
|
factory :poll_recount, class: 'Poll::Recount' do
|
||||||
association :author, factory: :user
|
association :author, factory: :user
|
||||||
origin { 'web' }
|
origin 'web'
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :officing_residence, class: 'Officing::Residence' do
|
factory :officing_residence, class: 'Officing::Residence' do
|
||||||
|
|||||||
Reference in New Issue
Block a user