class TestUnit::Generators::ScaffoldGenerator
:nodoc:
:nodoc:
:nodoc:
def attributes_hash
def attributes_hash return if attributes_names.empty? attributes_names.map do |name| if %w(password password_confirmation).include?(name) && attributes.any?(&:password_digest?) "#{name}: 'secret'" else "#{name}: @#{singular_table_name}.#{name}" end end.sort.join(', ') end
def create_test_files
def create_test_files template_file = options.api? ? "api_functional_test.rb" : "functional_test.rb" template template_file, File.join("test/controllers", controller_class_path, "#{controller_file_name}_controller_test.rb") end
def fixture_name
def fixture_name @fixture_name ||= if mountable_engine? (namespace_dirs + [table_name]).join("_") else table_name end end