Class: Spec
- Inherits:
-
Erebus::NamedGenerator
- Object
- Thor::Group
- Erebus::Generator
- Erebus::NamedGenerator
- Spec
- Defined in:
- lib/erebus/generators/spec.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Erebus::Generator
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/erebus/generators/spec.rb', line 10 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#create_source_file ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/erebus/generators/spec.rb', line 14 def create_source_file Spec.validate_project if([:use_alt]) template "templates/spec_alt.erb", "spec/#{file_name}_spec.#{ext}" else template "templates/spec.erb", "spec/#{file_name}_spec.#{ext}" end end |