Sha256: aa2075d351e06b45fc091b5f47272da53b3e79a99e72279bffcc0dd90981bba5
Contents?: true
Size: 820 Bytes
Versions: 24
Compression:
Stored size: 820 Bytes
Contents
module HorsePower class TestsGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :resource_name, :type => :string argument :api_version, :type => :string, :default => "1" argument :attributes, type: :array, default: [], banner: "field:type field:type" def sprint template "model.rb.erb", "spec/api/v#{api_version}/models/#{HorsePower.get_singular(resource_name)}_spec.rb" template "routing.rb.erb", "spec/api/v#{api_version}/routing/#{HorsePower.get_singular(resource_name)}_spec.rb" template "factory.rb.erb", "spec/factories/#{HorsePower.get_singular(resource_name)}_#{api_version}_factory.rb" template "request.rb.erb", "spec/api/v#{api_version}/requests/#{HorsePower.get_singular(resource_name)}_spec.rb" end private end end
Version data entries
24 entries across 24 versions & 1 rubygems