Class: Lesli::SpecGenerator

Inherits:
ApplicationLesliGenerator show all
Defined in:
lib/generators/lesli/spec/spec_generator.rb

Instance Method Summary collapse

Methods inherited from ApplicationLesliGenerator

#parse_info, #parse_model

Instance Method Details

#generatorObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/generators/lesli/spec/spec_generator.rb', line 10

def generator
    L2.msg "Generating Lesli Model spec"

    pp @info;
    pp "---     ---     ---     ---     ---     ---"
    pp @model;
    pp "---     ---     ---     ---     ---     ---"
    pp @services;
    pp "---     ---     ---     ---     ---     ---"
    pp @rspec;

    #template("spec-factory.template", "#{(@info[:engine].constantize)::Engine.root.join('spec', 'factories', @info[:engine_resource_code])}.rb")
    template("spec-model.template", "#{(@info[:engine].constantize)::Engine.root.join('spec', 'models', @info[:engine_resource_code])}_spec.rb")
end