Sha256: 23ab4f851f21f9f0459bd246c2db810a14587bc9d04df5f064ce97a7039893bd

Contents?: true

Size: 506 Bytes

Versions: 3

Compression:

Stored size: 506 Bytes

Contents

# frozen_string_literal: true

require_relative 'helper'

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

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

  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

3 entries across 3 versions & 1 rubygems

Version Path
ffaker-2.21.0 test/test_gender_ja.rb
ffaker-2.20.0 test/test_gender_ja.rb
ffaker-2.19.0 test/test_gender_ja.rb