Sha256: 10cda19c2e1194d4f93938c1bf72ac920d411c52c6f960b506da115f3c57d8a7
Contents?: true
Size: 620 Bytes
Versions: 10
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true module Spout module Tests # Tests to assure that the domain name starts with a lowercase letter # followed by lowercase letters, numbers, or underscores module FormNameFormat Dir.glob("forms/**/*.json").each do |file| define_method("test_form_name_format: #{file}") do message = "Form name format error. Name must start with a lowercase letter and be followed by lowercase letters, numbers, or underscores" assert_match(/^[a-z]\w*$/, (begin JSON.parse(File.read(file))["id"] rescue nil end), message) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems