Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Fix rubocop warnings #313

Merged
merged 3 commits into from
Jan 19, 2022
Merged

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jan 17, 2022

With recent updates of rubocop-rspec and rubocop-rails, we got a few new warnings that this PR addresses - some through following the cop's recommendations, some through disabling them.

We don't use this mixin in this gem, and using the class methods on
`FactoryBot` is IMO clearer.
Since Rail 5.0, `belongs_to` associations are required by default, and
the preferred syntax for configuring this is using the `optional`
configuration key.

Since this gem must be compatible with all versions of Solidus down to
2.0, and we used to have belongs_to_required_by_default set to 'false',
  we do need to specify this default setting.

This fixes a Rubocop warning about the redundant validation on the
`store` association.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tvdeyen tvdeyen merged commit 306e804 into solidusio:master Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants