Skip to content

BugFix: standardise parity on :increment_sequence#1756

Merged
neilvcarvalho merged 1 commit intothoughtbot:mainfrom
CodeMeister:syntax-methods-generate
Jul 18, 2025
Merged

BugFix: standardise parity on :increment_sequence#1756
neilvcarvalho merged 1 commit intothoughtbot:mainfrom
CodeMeister:syntax-methods-generate

Conversation

@CodeMeister
Copy link
Contributor

@CodeMeister CodeMeister commented Jul 12, 2025

Fixes: #1754

The issue was .increment_sequence within FactoryBot::Evaluator was un-defining, then replacing, the .increment_sequence method included from FactoryBot::Syntax::Methods, but there was a parity miss-match.

  • Refactored :increment_sequence in both modules to remove the URI requirement.
  • Updated sequence specs for both direct and implicit strategy use.
    • FactoryBot.build(:user)
    • build(:user)

No change to the user API.

- Refactored :increment_sequence to remove the URI requirement.
- Updated sequence specs for both direct and implicit strategy use.
  - FactoryBot.build(:user)
  - build(:user)
@CodeMeister CodeMeister changed the title Improve sequence handling with better context support BugFix: standardise parity on :increment_sequence Jul 15, 2025
Copy link
Member

@neilvcarvalho neilvcarvalho 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!

@neilvcarvalho neilvcarvalho merged commit 28af653 into thoughtbot:main Jul 18, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#generate method is throwing an error when used inside of a factory definition when FactoryBot::Syntax::Methods is included

2 participants