Class: Minitest::Generators::HelperGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/minitest/helper/helper_generator.rb

Instance Method Summary collapse

Methods inherited from Base

default_source_root

Instance Method Details

#create_helper_filesObject


8
9
10
11
12
13
14
15
16
# File 'lib/generators/minitest/helper/helper_generator.rb', line 8

def create_helper_files
  if options[:spec]
    template_file = "helper_spec.rb"
  else
    template_file = "helper_test.rb"
  end
  template template_file,
           File.join("test/helpers", class_path, "#{file_name}_helper_test.rb")
end