Sha256: b2eba7a90690a5818f603648e5e28884cacbd3158adbd08dda162228382a1a7d

Contents?: true

Size: 642 Bytes

Versions: 1

Compression:

Stored size: 642 Bytes

Contents

# encoding: UTF-8

require 'helper'

class TestFakerNameBR < Test::Unit::TestCase
  def setup
    @tester = FFaker::NameBR
  end

  def test_name
    assert_match(/\A[[:alpha:]]+ [[:alpha:]]+\z/, @tester.name)
  end

  def test_name_with_prefix
    prefix, name = @tester.name_with_prefix.split(/\s+/)
    assert_include(@tester::PREFIXES, prefix)
    assert(name.length > 0)
  end

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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffaker-2.1.0 test/test_name_br.rb