Sha256: 958243d6fe800e1f7b0f9ee2edab4b0c40bc6a8a10eceb5cab0fdfe7cfd698fa

Contents?: true

Size: 900 Bytes

Versions: 10

Compression:

Stored size: 900 Bytes

Contents

# encoding: utf-8

require 'helper'

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

  assert_methods_are_deterministic(
    FFaker::NameSE,
    :last_name, :first_name_male, :first_name_female,
    :prefix, :first_name, :name
  )

  def setup
    @tester = FFaker::NameSE
  end

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

  def test_first_name_male
    assert_include @tester::FIRST_NAMES_MALE, @tester.first_name_male
  end

  def test_first_name_female
    assert_include @tester::FIRST_NAMES_FEMALE, @tester.first_name_female
  end

  def test_prefix
    assert_include @tester::PREFIXES, @tester.prefix
  end

  def test_first_name
    parts = @tester.first_name.split(' ')
    assert_include [1, 2], parts.count
  end

  def test_name
    parts = @tester.name.split(' ')
    assert_include [2, 3, 4], parts.count
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ffaker-2.11.0 test/test_name_se.rb
ffaker-2.10.0 test/test_name_se.rb
ffaker-2.9.0 test/test_name_se.rb
ffaker-2.8.1 test/test_name_se.rb
ffaker-2.8.0 test/test_name_se.rb
ffaker-2.7.0 test/test_name_se.rb
ffaker-2.6.0 test/test_name_se.rb
ffaker-2.5.0 test/test_name_se.rb
ffaker-2.4.0 test/test_name_se.rb
ffaker-2.3.0 test/test_name_se.rb