Class: Minitest::Generators::GeneratorGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/minitest/generator/generator_generator.rb

Instance Method Summary collapse

Methods inherited from Base

default_source_root

Instance Method Details

#create_generator_filesObject


11
12
13
14
15
16
17
18
19
# File 'lib/generators/minitest/generator/generator_generator.rb', line 11

def create_generator_files
  if options[:spec]
    template_file = "generator_spec.rb"
  else
    template_file = "generator_test.rb"
  end
  template template_file,
           File.join("test/lib/generators", class_path, "#{file_name}_generator_test.rb")
end