Class: Rails::Generators::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/rails.rb

Class Method Summary collapse

Class Method Details

.determine_default_generator(name) ⇒ Object

Raises:

  • (NameError)

133
134
135
136
137
138
139
# File 'lib/minitest/rails.rb', line 133

def self.determine_default_generator(name)
  generator = determine_constant_from_test_name(name) do |constant|
    Class === constant && constant < Rails::Generators::Base
  end
  raise NameError.new("Unable to resolve generator for #{name}") if generator.nil?
  generator
end