rubocop-factory_bot icon indicating copy to clipboard operation
rubocop-factory_bot copied to clipboard

Code style checking for factory_bot files

Results 30 rubocop-factory_bot issues
Sort by recently updated
recently updated
newest added
trafficstars

When I initially implemented the cop, I left the case when someone uses (1..n).each {} and added check only for `.times` iteration. I feel now it's the time to improve...

enhancement

This is marked as a 'pending' rule, so I'm not 100% this will be enabled by default, but that seems to be the case more often than not with rubocop...

Fix #13 ______________________________________________________________________ Before submitting the PR make sure the following are checked: - [x] Feature branch is up-to-date with `master` (if not - rebase it). - [x] Squashed related...

Fix #79 ______________________________________________________________________ Before submitting the PR make sure the following are checked: - [x] Feature branch is up-to-date with `master` (if not - rebase it). - [x] Squashed related...

* Related * https://github.com/rubocop/rubocop-factory_bot/pull/52#issuecomment-1774662427 * https://github.com/thoughtbot/factory_bot_rails/issues/438 Removing `sequence(:id)` automatically breaks the factory, not only for non-database POROs, but also DB models with id is not generated. According to the issue...

Issues: - Resolves https://github.com/rubocop/rubocop-factory_bot/issues/79 - Resolves https://github.com/rubocop/rubocop-factory_bot/issues/82 Another approach: - https://github.com/rubocop/rubocop-factory_bot/pull/141 ______________________________________________________________________ Before submitting the PR make sure the following are checked: - [x] Feature branch is up-to-date with `master`...

A change related to keywords was introduced here: * https://github.com/rubocop/rubocop-factory_bot/pull/60 At that time, the implementation was adjusted so that the following code would **not** be treated as an offense, but...

Implicit associations inside global trait definitions with `EnforcedStyle: explicit` were not being detected as offenses: ```ruby FactoryBot.define do trait :with_user do user # ^^^^ end end ``` but I believe...

Fixes: #10 ______________________________________________________________________ Before submitting the PR make sure the following are checked: - [ ] Feature branch is up-to-date with `master` (if not - rebase it). - [ ]...

Fixes: #105 ______________________________________________________________________ Before submitting the PR make sure the following are checked: - [x] Feature branch is up-to-date with `master` (if not - rebase it). - [x] Squashed related...