0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 18:50:27 +01:00
discourse-custom-wizard/spec/components/custom_wizard/realtime_validation_spec.rb

18 Zeilen
516 B
Ruby

# frozen_string_literal: true
describe CustomWizard::RealtimeValidation do
2021-02-16 15:36:05 +01:00
validation_names = CustomWizard::RealtimeValidation.types.keys
2021-02-16 15:36:05 +01:00
validation_names.each do |name|
klass_str = "CustomWizard::RealtimeValidation::#{name.to_s.camelize}"
2021-02-16 15:36:05 +01:00
it "ensure class for validation: #{name} exists" do
expect(klass_str.safe_constantize).not_to be_nil
end
2021-02-16 15:36:05 +01:00
it "#{klass_str} has a perform() method" do
expect(klass_str.safe_constantize.instance_methods).to include(:perform)
end
end
end