Class: Rspec::Generators::ModelGenerator
- Defined in:
- lib/generators/rspec/model/model_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#create_fixture_file ⇒ Object
15 16 17 18 19 |
# File 'lib/generators/rspec/model/model_generator.rb', line 15 def create_fixture_file if [:fixture] && [:fixture_replacement].nil? template 'fixtures.yml', File.join('spec/fixtures', "#{table_name}.yml") end end |
#create_model_spec ⇒ Object
9 10 11 |
# File 'lib/generators/rspec/model/model_generator.rb', line 9 def create_model_spec template 'model_spec.rb', File.join('spec/models', class_path, "#{file_name}_spec.rb") end |