2012-04-28 19:26:57 +00:00
|
|
|
module Rspec
|
|
|
|
class DecoratorGenerator < ::Rails::Generators::NamedBase
|
|
|
|
source_root File.expand_path('../templates', __FILE__)
|
|
|
|
|
|
|
|
def create_spec_file
|
2012-09-21 16:02:06 +00:00
|
|
|
template 'decorator_spec.rb', File.join('spec/decorators', class_path, "#{singular_name}_decorator_spec.rb")
|
2012-04-28 19:26:57 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|