Sha256: fdfbfeb6dd1a7057fbea4465118bc0b4f4ac93077a4038ac77bf50cd46ee78ea

Contents?: true

Size: 1.29 KB

Versions: 7

Compression:

Stored size: 1.29 KB

Contents

require 'helper'

class TestAddress < Test::Unit::TestCase
  def test_city
    assert_match /[ a-z]+/, Faker::Address.city
  end

  def test_city_prefix
    assert_match /[ a-z]/, Faker::Address.city_prefix
  end

  def test_city_suffix
    assert_match /[ a-z]/, Faker::Address.city_suffix
  end

  def test_secondary_address
    assert_match /[ a-z]/, Faker::Address.secondary_address
  end

  def test_street_address
    assert_match /[ a-z]/, Faker::Address.street_address
  end

  def test_street_name
    assert_match /[ a-z]/, Faker::Address.street_name
  end

  def test_street_suffix
    assert_match /[ a-z]/, Faker::Address.street_suffix
  end

  def test_uk_country
    assert_match /[ a-z]/, Faker::Address.uk_country
  end

  def test_uk_county
    assert_match /[ a-z]/, Faker::Address.uk_county
  end

  def test_uk_postcode
    assert_match /[ a-z]/, Faker::Address.uk_postcode
  end

  def test_us_state
    assert_match /[ a-z]/, Faker::Address.us_state
  end

  def test_us_state_abbr
    assert_match /[A-Z]/, Faker::Address.us_state_abbr
  end

  def test_zip_code
    assert_match /[0-9]/, Faker::Address.zip_code
  end

  def test_zip_code_frozen
    assert Faker::Address.zip_code.frozen? == false
  end

  def test_neighborhood
    assert_match /[ a-z]+/, Faker::Address::neighborhood
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ffaker-1.15.0 test/test_address.rb
ffaker-1.14.0 test/test_address.rb
ffaker-1.13.0 test/test_address.rb
ffaker-1.12.1 test/test_address.rb
ffaker-1.12.0 test/test_address.rb
ffaker-1.11.0 test/test_address.rb
ffaker-1.10.1 test/test_address.rb