Sha256: bacbe3814c849f0d61fd7cb63669796877dbd36d2700cd7f126bc2cf67eb59a1

Contents?: true

Size: 447 Bytes

Versions: 1

Compression:

Stored size: 447 Bytes

Contents

module Rspec
  module Generators
    class GrapeScaffoldGenerator < Rails::Generators::Base
      argument :vendor, required: true, desc: 'The API vendor name'
      argument :resource, required: true, desc: 'The resource API name'

      source_root File.expand_path("../templates", __FILE__)

      def create_spec_file
        template "resource_spec.rb",
                 "spec/api/#{vendor}/#{resource}_api_spec.rb"
      end
    end
end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grape-api-generator-0.1.0 lib/generators/rspec/grape_scaffold_generator.rb