blob: 5d1ac1dde48bd9e9490813e24927ff3a906a4b32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require 'rails/generators/test_unit'
require 'rails/generators/resource_helpers'
module TestUnit
module Generators
class ScaffoldGenerator < Base
include Rails::Generators::ResourceHelpers
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/controllers', controller_class_path, "#{controller_file_name}_controller_test.rb")
end
end
end
end
|