Repository navigation
Provide collision-free framework test fabricators - #189
Merged
Merged
Conversation
dblock
force-pushed
the
fix/fabricator-collision
branch
3 times, most recently
from
October 25, 2026 20:19
7da8f16 to
a14c748
Compare
Danger ReportNo issues found. |
Co-authored-by: Copilot <[email protected]>
dblock
force-pushed
the
fix/fabricator-collision
branch
from
October 25, 2026 20:22
a14c748 to
3121d3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #19. Reproduced
Fabrication::DuplicateFabricatorErrorby defining an application:teamand then requiring the existing RSpec helper.Add
slack-ruby-bot-server/rspec/fabricators, which registers only the prefixed:slack_ruby_bot_server_teamfor the existing top-level Team model. Applications can explicitly define/load their own:teambefore or after this entry point, including deriving one from the prefixed defaults.Preserve the legacy
slack-ruby-bot-server/rspecentry point and the direct legacy fabricator path. They provide the existing:teamname when it is free, but no longer overwrite or collide with an application definition already registered. Applications defining:teamlater should use the new prefixed-only entry point instead; document that loading both still opts into the legacy alias. Keep existing unique token/team ID sequences and Faker names. No runtime dependencies added.Validation
Focused lint passes. API, model, service, and test-helper specs: 89 examples, 0 failures with both Mongoid 9.1 and Active Record 8.1 on Ruby 4/Grape 4. Existing pending examples remain (two Mongoid, one Active Record).
Six new cases cover persisted framework installations with unique credentials, legacy helper compatibility, preservation of an existing application factory, application inheritance, and both loading orders with the prefixed-only helper. Registration cases run in fresh Ruby subprocesses to verify real require behavior without mutating the parent Fabrication registry.
Authored by Copilot (AI), on behalf of @dblock.