Class: Rspec::Generators::FeatureGenerator Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Base ,
Rails::Generators::NamedBase
|
|
Instance Chain:
self,
Base ,
::RSpec::Rails::FeatureCheck ,
Rails::Generators::NamedBase
|
|
Inherits: |
Rspec::Generators::Base
|
Defined in: | rspec-rails/lib/generators/rspec/feature/feature_generator.rb |
Class Method Summary
Base
- Inherited
.configuration | Load configuration from |
.source_root |
Instance Method Summary
- #filename Internal use only
- #generate_feature_spec Internal use only
- #template_name Internal use only
Base
- Inherited
::RSpec::Rails::FeatureCheck
- Included
Instance Method Details
#filename
[ GitHub ]# File 'rspec-rails/lib/generators/rspec/feature/feature_generator.rb', line 20
def filename if [:singularize] "#{file_name.singularize}_spec.rb" else "#{file_name}_spec.rb" end end
#generate_feature_spec
[ GitHub ]# File 'rspec-rails/lib/generators/rspec/feature/feature_generator.rb', line 10
def generate_feature_spec return unless [:feature_specs] template template_name, target_path('features', class_path, filename) end
#template_name
[ GitHub ]# File 'rspec-rails/lib/generators/rspec/feature/feature_generator.rb', line 16
def template_name [:singularize] ? 'feature_singular_spec.rb' : 'feature_spec.rb' end