class Rspec::Generators::ComponentGenerator
def spec_component_path
def spec_component_path return "spec/components" unless ViewComponent::Base.config.generate.use_component_path_for_rspec_tests configured_component_path = component_path if configured_component_path.start_with?("app#{File::SEPARATOR}") _app, *rest_of_path = Pathname.new(configured_component_path).each_filename.to_a File.join("spec", *rest_of_path) else "spec/components" end end