Hello guys, I was ready to open a feature request, but I'm not sure if it would make sense for rspec-rails so I'm asking about this here.
This gem github/view_component <https://github.com/github/view_component> allow us build components for rails, and their convention is put specs on "spec/components", we need add TestHelpers github/view_component#setting-up-rspec <https://github.com/github/view_component#setting-up-rspec> on the configuration for specs of *:component *type and thats fine, but the only think which is frustating me is the fact that rspec-rails isn't able to infer the type of the spec based on the file location, because the directory mappings doesn't include `spec/components` rspec/rails/configuration.rb#L28 <https://github.com/rspec/rspec-rails/blob/main/lib/rspec/rails/configuration.rb#L28> and at our projects we use the *infer_spec_type_from_file_location! *to avoid the needing of set the spec type, but only for view_components we need define the type. In theory only add "component: %w[spec components]" to the directory mappings would be enough, but because view_component isn't a rails feature I'm not sure if this would make sense to the project and maybe the best approach would be set the type of the spec on each file for this cases. What is your opinion on this? I'm a newbie on ruby/rails/rspec stack and maybe I'm saying a lot of bullshit here (my English is not the best, too), sorry for anything. -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/a76acebd-8202-4bd3-b27b-ba0255880175n%40googlegroups.com.
