Sha256: f0c51259c0046335a1f14c4d2abf24a4d727b392ad334e781a02438133f5d2ca

Contents?: true

Size: 354 Bytes

Versions: 2

Compression:

Stored size: 354 Bytes

Contents

# encoding: UTF-8

require 'helper'

class TestFakerName < Test::Unit::TestCase
  def setup
    @tester = FFaker::Name
  end

  def test_name
    assert_match(/(\w+\.? ?){2,3}/, @tester.name)
  end

  def test_prefix
    assert_match(/[A-Z][a-z]+\.?/, @tester.prefix)
  end

  def test_suffix
    assert_match(/[A-Z][a-z]*\.?/, @tester.suffix)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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