Class: Rspec::SwaggerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/rspec/swagger_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_spec_fileObject



15
16
17
# File 'lib/generators/rspec/swagger_generator.rb', line 15

def create_spec_file
  template 'spec.rb', File.join('spec', options['spec_path'], "#{controller_path}_spec.rb")
end

#setupObject



11
12
13
# File 'lib/generators/rspec/swagger_generator.rb', line 11

def setup
  @routes = Rswag::RouteParser.new(controller_path).routes
end