Sha256: fe64d9f145fe90a9dc796a77ae91ed5f956beb98f34dc1de80f98609d5206f2c

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

# encoding: utf-8

require 'helper'

class TestFakerNameNB < Test::Unit::TestCase
  def setup
    @tester = FFaker::NameNB
  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

2 entries across 2 versions & 1 rubygems

Version Path
ffaker-2.2.0 test/test_name_nb.rb
ffaker-2.1.0 test/test_name_nb.rb