Class: Minitest::Generators::Base

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

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_source_rootObject



13
14
15
# File 'lib/generators/minitest.rb', line 13

def self.default_source_root
  File.expand_path(File.join(File.dirname(__FILE__), "minitest", generator_name, "templates"))
end

Instance Method Details

#spec_expectation_monadObject



23
24
25
26
27
28
# File 'lib/generators/minitest.rb', line 23

def spec_expectation_monad
  monad = options[:spec_expectation_monad]
  return monad if %w[value expect _].include? monad

  "value"
end

#test_file_typeObject



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

def test_file_type
  return "spec" if options[:spec]

  "test"
end