[Fix #13] Fix FactoryBot/CreateList to detect iterations over ranges.#143
Conversation
|
What about |
|
Please correct me if I’m mistaken, but create_pair/create_list is a syntactic sugar over create in iterators. Not to mention that create_list may be inferior in some cases thoughtbot/factory_bot#1444 I kindly appreciate an immense effort you’ve put into this PR, @ydakuka 🙏🙌🙇♂️ |
It will be ignored, like this: https://github.com/rubocop/rubocop-factory_bot/blob/master/spec/rubocop/cop/factory_bot/create_list_spec.rb#L63 |
There is the issue #50 for this edge case, but personally, I don’t use it at all.
No, I found an interesting issue and have some time to work on it. |
Fix #13
Before submitting the PR make sure the following are checked:
master(if not - rebase it).CHANGELOG.mdif the new code introduces user-observable changes.bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).If you have created a new cop:
config/default.yml.Enabled: pendinginconfig/default.yml.VersionAdded: "<<next>>"indefault/config.yml.If you have modified an existing cop's configuration options:
VersionChanged: "<<next>>"inconfig/default.yml.