Class: Minitest::Generators::InstallGenerator

Inherits:
Rails::Generators::AppBase
  • Object
show all
Defined in:
lib/generators/minitest/install/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



16
17
18
# File 'lib/generators/minitest/install/install_generator.rb', line 16

def self.source_root
  @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), "templates"))
end

Instance Method Details

#copy_minitest_filesObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/generators/minitest/install/install_generator.rb', line 20

def copy_minitest_files
  empty_directory_with_keep_file "test/fixtures"
  empty_directory_with_keep_file "test/fixtures/files"
  empty_directory_with_keep_file "test/controllers"
  empty_directory_with_keep_file "test/mailers"
  empty_directory_with_keep_file "test/models"
  empty_directory_with_keep_file "test/helpers"
  empty_directory_with_keep_file "test/integration"

  template "test/channels/application_cable/connection_test.rb"
  template "test/application_system_test_case.rb"
  template "test/test_helper.rb"
end