Class: Evilution::Config::Validators::Integration

Inherits:
Base
  • Object
show all
Defined in:
lib/evilution/config/validators/integration.rb

Constant Summary collapse

ALLOWED =
%i[rspec minitest test_unit].freeze

Class Method Summary collapse

Class Method Details

.call(value) ⇒ Object

CLI users naturally write the gem name ‘test-unit`; the internal symbol uses underscore form to match the file path and registry key. Normalize hyphenated string input before coercion.



11
12
13
14
# File 'lib/evilution/config/validators/integration.rb', line 11

def self.call(value)
  value = value.tr("-", "_") if value.is_a?(String)
  coerce_symbol!(value, allowed: ALLOWED, name: "integration")
end