Sha256: 2f3e097a20a673c3d3a076d360338b00d17403011c5263ff9b8d49b38dfa05e9

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

require_relative './test_helper'

class TestGenerator < Minitest::Test
  def setup
    @generator = Generator.new('a?*#z')
  end

  def test_initialize
    assert_equal 5, @generator.format.length
  end

  def test_generate
    assert_equal 5, @generator.generate.length
    assert_equal 'a', @generator.generate[0]
    assert_includes String::ALPHABET, @generator.generate[1]
    assert_includes String::VOWELS, @generator.generate[2]
    assert_includes String::CONSONANTS, @generator.generate[3]
    assert_equal 'z', @generator.generate[4]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
namna-0.0.3 test/generator_test.rb