Sha256: ed3970302acadf58d1e590460e6d2d9087e0826cc224811c0b09b80c8feef0d3

Contents?: true

Size: 508 Bytes

Versions: 2

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

require_relative 'helper'

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

  GENDER_REGEX = /\A(maschio|femmina)\z/

  assert_methods_are_deterministic(FFaker::GenderIT, :random)

  def setup
    @tester = FFaker::GenderIT
  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_it.rb
ffaker-2.22.0 test/test_gender_it.rb