class TestUnit::Generators::ScaffoldGenerator

def accessible_attributes

def accessible_attributes
  attributes.reject(&:reference?)
end

def attributes_hash

def attributes_hash
  return if accessible_attributes.empty?
  accessible_attributes.map do |a|
    name = a.name
    key_value name, "@#{singular_table_name}.#{name}"
  end.sort.join(', ')
end

def create_test_files

def create_test_files
  template 'functional_test.rb',
           File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb")
end

def resource_attributes

def resource_attributes
  key_value singular_table_name, "{ #{attributes_hash} }"
end