Top Level Namespace

Defined Under Namespace

Modules: RSpec, Rails Classes: DemoGenerator, TestApp

Instance Method Summary collapse

Instance Method Details

#model_helper_for(orm) ⇒ Object



91
92
93
94
# File 'lib/rspec_for_generators/rails_helpers/rails_model.rb', line 91

def model_helper_for orm
  include RSpec::Rails::Model
  set_orm orm
end

#require_generators(*generator_list) ⇒ Object

require the generators



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

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