Class: Minitest::Generators::FeatureGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/minitest/feature/feature_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/generators/minitest/feature/feature_generator.rb', line 8

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

Instance Method Details

#create_test_filesObject



16
17
18
19
20
21
22
# File 'lib/generators/minitest/feature/feature_generator.rb', line 16

def create_test_files
  if options[:spec]
    template "feature_spec.rb", File.join("test/features", class_path, "#{file_name}_test.rb")
  else
    template "feature_test.rb", File.join("test/features", class_path, "#{file_name}_test.rb")
  end
end