Class: Saki::SpecGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/saki/spec_generator.rb

Instance Method Summary collapse

Instance Method Details

#manifestObject



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_nameObject



6
7
8
# File 'lib/generators/saki/spec_generator.rb', line 6

def resource_name
  file_name.tableize.singularize
end