Class: Rspec::Generators::ModelGenerator 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/model/model_generator.rb |
Class Method Summary
Base
- Inherited
.configuration | Load configuration from |
.source_root |
Instance Attribute Summary
- #missing_fixture_replacement? ⇒ Boolean readonly private Internal use only
Instance Method Summary
- #create_fixture_file Internal use only
- #create_model_spec Internal use only
Base
- Inherited
::RSpec::Rails::FeatureCheck
- Included
Instance Attribute Details
#missing_fixture_replacement? ⇒ Boolean
(readonly, private)
# File 'rspec-rails/lib/generators/rspec/model/model_generator.rb', line 32
def missing_fixture_replacement? [:fixture] && [:fixture_replacement].nil? end
Instance Method Details
#create_fixture_file
[ GitHub ]# File 'rspec-rails/lib/generators/rspec/model/model_generator.rb', line 24
def create_fixture_file return unless missing_fixture_replacement? template 'fixtures.yml', target_path('fixtures', class_path, "#{(pluralize_table_names? ? plural_file_name : file_name)}.yml") end
#create_model_spec
[ GitHub ]# File 'rspec-rails/lib/generators/rspec/model/model_generator.rb', line 13
def create_model_spec template_file = target_path( 'models', class_path, "#{file_name}_spec.rb" ) template 'model_spec.rb', template_file end