aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/generators/test_unit/scaffold/scaffold_generator.rb
blob: 78fcea1e9c349a542c7dcc98e16e67fc64206d44 (plain) (tree)
1
2
3
4
5
6
7
8




                                  
                                             

                                                                                                    








                                                                                                                  
require 'generators/test_unit'

module TestUnit
  module Generators
    class ScaffoldGenerator < Base
      include Rails::Generators::ScaffoldBase

      class_option :singleton, :type => :boolean, :desc => "Supply to create a singleton controller"
      check_class_collision :suffix => "ControllerTest"

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