Sha256: 12c42b29e6b4c116a86747dedb1ef6cdd5ab9ae6e31d0956cc5d2d22d307c5e2

Contents?: true

Size: 746 Bytes

Versions: 7

Compression:

Stored size: 746 Bytes

Contents

# frozen_string_literal: true

require 'helper'

class TestAddressRU < Test::Unit::TestCase
  include DeterministicHelper

  assert_methods_are_deterministic(
    FFaker::AddressRU,
    :city, :province, :street_address, :street_name, :zip_code
  )

  def setup
    @tester = FFaker::AddressRU
  end

  def test_city
    assert_match(/\A[a-zа-яё\-\s]+\z/i, @tester.city)
  end

  def test_province
    assert_match(/\A[a-zа-яё\-\s]+\z/i, @tester.province)
  end

  def test_zip_code
    assert_match(/\A\d{6}\z/, @tester.zip_code)
  end

  def test_street_name
    assert_match(/\A[a-zа-яё.\-\s]+\z/i, @tester.street_name)
  end

  def test_street_address
    assert_match(/\A[a-zа-яё.,\-\s\d]+\z/i, @tester.street_address)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ffaker-2.18.0 test/test_address_ru.rb
ffaker-2.17.0 test/test_address_ru.rb
ffaker-2.16.0 test/test_address_ru.rb
ffaker-2.15.0 test/test_address_ru.rb
ffaker-2.14.0 test/test_address_ru.rb
ffaker-2.13.0 test/test_address_ru.rb
ffaker-2.12.0 test/test_address_ru.rb