Class: HorsePower::TestsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/horse_power/tests/tests_generator.rb

Instance Method Summary collapse

Instance Method Details

#sprintObject



8
9
10
11
12
13
# File 'lib/generators/horse_power/tests/tests_generator.rb', line 8

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