Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 7ad4c7c881
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (19 sloc) 0.708 kb
require 'rails/generators/test_unit'
require 'rails/generators/resource_helpers'
module TestUnit
module Generators
class ScaffoldGenerator < Base
include Rails::Generators::ResourceHelpers
check_class_collision :suffix => "ControllerTest"
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
def create_test_files
template 'functional_test.rb',
File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb")
end
private
def accessible_attributes
attributes.reject(&:reference?).map {|a| "\"#{a.name}\"" }.sort.join(', ')
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.