Class: MySpec::Generators::IntegrationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
MyGenerators::Generators::MyScaffoldGenerator
Defined in:
lib/generators/my_spec/integration/integration_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MyGenerators::Generators::MyScaffoldGenerator

#method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MyGenerators::Generators::MyScaffoldGenerator

Class Method Details

.source_rootObject



15
16
17
# File 'lib/generators/my_spec/integration/integration_generator.rb', line 15

def self.source_root
  @source_root ||= File.expand_path("templates", File.dirname(__FILE__))
end

Instance Method Details

#generate_request_specObject



9
10
11
12
13
14
# File 'lib/generators/my_spec/integration/integration_generator.rb', line 9

def generate_request_spec
  return unless options[:request_specs]

  template 'request_spec.rb',
           File.join('spec/requests', class_path, "#{table_name}_spec.rb")
end