Sha256: 101c78d937ff481dc00b3aa6efb8333d28b966a18d37fbac5007c027709b3a73
Contents?: true
Size: 659 Bytes
Versions: 2
Compression:
Stored size: 659 Bytes
Contents
# encoding: UTF-8 require 'helper' class TestFakerNameBR < Test::Unit::TestCase def setup @tester = Faker::NameBR end def test_name assert_match /[[:alpha:]]+ [[:alpha:]]+/, @tester.name end def test_name_with_prefix prefixes = @tester::PREFIXES.map { |p| Regexp.escape(p) } assert_match /(#{prefixes.join('|')}) [[:alpha:]]+ [[:alpha:]]+/, @tester.name_with_prefix end def test_first_name assert @tester::FIRST_NAMES.include? @tester.first_name end def test_last_name assert @tester::LAST_NAMES.include? @tester.last_name end def test_prefix assert @tester::PREFIXES.include? @tester.prefix end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ffaker-1.24.0 | test/test_name_br.rb |
ffaker-1.23.0 | test/test_name_br.rb |