Sha256: 42f87760bb6a3c48046939f2cbc9e3a547c587e8e39733fac7286a7167322622

Contents?: true

Size: 499 Bytes

Versions: 2

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

require_relative 'helper'

class TestFakerGenderJA < Test::Unit::TestCase
  include DeterministicHelper

  GENDER_REGEX = /\A[女男]\z/

  assert_methods_are_deterministic(FFaker::GenderJP, :random)

  def setup
    @tester = FFaker::GenderJA
  end

  def test_random
    assert_match(GENDER_REGEX, @tester.random)
  end

  def test_sample
    assert_match(GENDER_REGEX, @tester.sample)
  end

  def test_maybe
    assert_match(GENDER_REGEX, @tester.maybe)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ffaker-2.23.0 test/test_gender_ja.rb
ffaker-2.22.0 test/test_gender_ja.rb