Class: MySpec::Generators::HelperGenerator
Class Method Summary
collapse
Instance Method Summary
collapse
#method_missing
Class Method Details
.source_root ⇒ Object
14
15
16
|
# File 'lib/generators/my_spec/helper/helper_generator.rb', line 14
def self.source_root
@source_root ||= File.expand_path("templates", File.dirname(__FILE__))
end
|
Instance Method Details
#generate_helper_spec ⇒ Object
8
9
10
11
12
|
# File 'lib/generators/my_spec/helper/helper_generator.rb', line 8
def generate_helper_spec
return unless options[:helper_specs]
template 'helper_spec.rb', File.join('spec/helpers', class_path, "#{file_name}_helper_spec.rb")
end
|