Class: Saki::SpecGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Saki::SpecGenerator
- Defined in:
- lib/generators/saki/spec_generator.rb
Instance Method Summary collapse
Instance Method Details
#manifest ⇒ Object
24 25 26 27 28 |
# File 'lib/generators/saki/spec_generator.rb', line 24 def manifest empty_directory File.join('spec/acceptance', class_path) file_name.gsub!(/_spec$/,"") template 'acceptance_spec.rb', File.join('spec/acceptance', class_path, "#{file_name}_spec.rb") end |
#resource_name ⇒ Object
6 7 8 |
# File 'lib/generators/saki/spec_generator.rb', line 6 def resource_name file_name.tableize.singularize end |