Top Level Namespace

Defined Under Namespace

Modules: RSpec, Rails, TmpRails Classes: DemoGenerator, TestApp

Instance Method Summary collapse

Instance Method Details

#require_generators(*generator_list) ⇒ Object Also known as: require_generator

require the generators



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/rspec_for_generators/generator_spec_helper.rb', line 12

def require_generators *generator_list
  generator_list.each do |name, generators|    
    if !generators || generators.empty
      require File.join('generators', name.to_s, "#{name.to_s}_generator")      
    else  
      generators.each do |generator_name|
        require File.join('generators', name.to_s, generator_name.to_s, "#{generator_name}_generator")
      end    
    end
  end
end