Class: Rspec::Generators::ComponentGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
ViewComponent::AbstractGenerator
Defined in:
lib/rails/generators/rspec/component_generator.rb

Instance Method Summary collapse

Methods included from ViewComponent::AbstractGenerator

#copy_view_file

Instance Method Details

#create_test_fileObject



12
13
14
# File 'lib/rails/generators/rspec/component_generator.rb', line 12

def create_test_file
  template "component_spec.rb", File.join(spec_component_path, class_path, "#{file_name}_component_spec.rb")
end