blob: 0f6255383ecbaf2620169178301b9dd7ed8249c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
require 'generators/test_unit'
module TestUnit
module Generators
class ScaffoldGenerator < Base
include Rails::Generators::ControllerNamedBase
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
|