Class: Diesel::Generators::FeaturesBase
- Inherits:
-
Base
- Object
- Rails::Generators::Base
- Base
- Diesel::Generators::FeaturesBase
show all
- Defined in:
- lib/diesel/generators/features_base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
engine, engine_name, engine_root, source_root, template_root
Class Method Details
.inherited(generator) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/diesel/generators/features_base.rb', line 19
def self.inherited(generator)
super
generator.desc(<<-DESC)
Copy cucumber feature files for the engine into your application.
DESC
end
|
Instance Method Details
#generate_features ⇒ Object
6
7
8
9
10
|
# File 'lib/diesel/generators/features_base.rb', line 6
def generate_features
features.each do |feature|
copy_file "features/engine/#{feature}", "features/#{engine_name}/#{feature}"
end
end
|
#generate_step_definitions ⇒ Object
12
13
14
15
16
17
|
# File 'lib/diesel/generators/features_base.rb', line 12
def generate_step_definitions
step_definitions.each do |step_definition|
copy_file "features/step_definitions/engine/#{step_definition}",
"features/step_definitions/#{engine_name}/#{step_definition}"
end
end
|