require "test/unit"

require "faker"

class TestLocale < Test::Unit::TestCase
  def test_case_name
    I18n.locale = :en
    Faker::Config.locale = :de
    assert Faker::PhoneNumber.phone_number.match(/\(0\d+\) \d+|\+49-\d+-\d+/)
    assert Faker::Address.street_name.match(//)
  end
end

# formats: ['(0###) #########', '(0####) #######', '+49-###-#######', '+49-####-########']

require "test/unit"

require "faker"

class TestLocale < Test::Unit::TestCase
  def teardown
    Faker::Config.locale = nil
  end

  def test_case_name
    I18n.locale = :en
    Faker::Config.locale = :de
    assert Faker::PhoneNumber.phone_number.match(/\(0\d+\) \d+|\+49-\d+-\d+/)
    assert Faker::Address.street_name.match(//)
  end
end

# formats: ['(0###) #########', '(0####) #######', '+49-###-#######', '+49-####-########']

Add teardown so locale test doesn't clobber other tests.
Add teardown so locale test doesn't clobber other tests.
