-
I'm often refactoring out various pieces of UI into components and don't need tests, is there a cli flag or configuration option that lets me opt-out of generating tests? |
Beta Was this translation helpful? Give feedback.
Answered by
schpet
Jun 27, 2023
Replies: 1 comment 1 reply
-
Hi @schpet, currently there's no option for this but I think we could add a Another way is to customize your generator by copying the ViewComponent one in your project and removing what you don't need. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for the suggestion!
i was about to make a PR and then realized this does seem to be supported already with the
--skip-test-framework
flag.https://api.rubyonrails.org/classes/Rails/Generators/Base.html#method-c-hook_for-label-Switches
i'm surprised this doesn't show up in the output of
rails g component --help
– i would expect it to be similar torails new --help
where it shows all the --skip flags. i imagine that's a change that would need to happen in rails.