require_relative './test_helper' class TestGenerator < Minitest::Test def test_random assert (3..7).include?(Generator.random.length) assert_equal 5, Generator.random(5).length end def test_human assert (3..7).include?(Generator.human.length) assert_equal 5, Generator.human(5).length end def test_format name = Generator.format('a?*#z') assert_equal 5, name.length assert_equal 'a', name[0] assert_equal 'z', name[4] assert_includes String::ALPHABET, name[1] assert_includes String::VOWELS, name[2] assert_includes String::CONSONANTS, name[3] end end