-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Underscores being removed from class name during tests #1588
Comments
That's happening because of a call to factory_bot/lib/factory_bot/factory.rb Line 26 in 4a37cb6
|
I see the problem...out of curiosity, why is |
|
ah so |
I understand that our use case might be too specific and it's not worth updating the library to solve an edge case like this. I appreciate the help! |
@luizkowalski a bit late, but we were able to resolve this issue in #1642. hope this helps your use case! |
thanks a lot, that's great! |
Description
hey team 馃憢馃徎
I'm currently trying to move away from defining the
class
attribute as a class to a string. The thing is, in this project, for different reasons, some classes have an underscore in their names. That is not going to change and it is like that for different reasons.Currently some factories are defined like this:
When I correct to String, like this
errors like below start to pop up:
Reproduction Steps
Expected behavior
Underscores are not to be removed from the class name
Actual behavior
System configuration
factory_bot version: 6.2.0
rails version: 7.0.6
ruby version: 3.2.2
The text was updated successfully, but these errors were encountered: