Class: Minitest::Generators::Base
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Minitest::Generators::Base
show all
- Defined in:
- lib/generators/minitest.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.default_source_root ⇒ Object
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_monad ⇒ Object
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_type ⇒ Object
17
18
19
20
21
|
# File 'lib/generators/minitest.rb', line 17
def test_file_type
return "spec" if options[:spec]
"test"
end
|