Sha256: 64cdbf03207cea6db36e7db15c7dc57c110edcf92e15aed676b0a07f2fbdfe78

Contents?: true

Size: 735 Bytes

Versions: 1

Compression:

Stored size: 735 Bytes

Contents

# frozen_string_literal: true

require_relative 'helper'

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

  assert_methods_are_deterministic(
    FFakerTW::NameTH,
    :last_name, :first_name, :nick_name, :name
  )

  def setup
    @tester = FFakerTW::NameTH
  end

  def test_last_name
    assert_include @tester::LAST_NAMES, @tester.last_name
  end

  def test_first_name
    assert_include @tester::FIRST_NAMES, @tester.first_name
  end

  def test_nick_name
    assert_include @tester::NICK_NAMES, @tester.nick_name
  end

  def test_name
    first_name, last_name = @tester.name.split(' ')
    assert_include @tester::FIRST_NAMES, first_name
    assert_include @tester::LAST_NAMES, last_name
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffakerTW-0.1.0 test/test_name_th.rb