Sha256: e760be54aa85411d23bc7ae9c1c210aae704eb00aa856e63cf4d25d062306cb2
Contents?: true
Size: 639 Bytes
Versions: 3
Compression:
Stored size: 639 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, encoding: "utf-8"))["id"] rescue nil end), message) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spout-1.0.0 | lib/spout/tests/form_name_format.rb |
spout-1.0.0.beta3 | lib/spout/tests/form_name_format.rb |
spout-1.0.0.beta2 | lib/spout/tests/form_name_format.rb |