Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simpler test_helper requires #1294

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
- [PR #1173](https://github.com/stympy/faker/pull/1173) Fix tests warning [@vbrazo](https://github.com/vbrazo)

### Chores
- [PR #1294](https://github.com/stympy/faker/pull/1294) Simpler requiring of test helper [@deivid-rodriguez](https://github.com/deivid-rodriguez)
- [PR #1288](https://github.com/stympy/faker/pull/1288) rake console changes - description and contributing.md [@MarcPer](https://github.com/MarcPer)
- [PR #1283](https://github.com/stympy/faker/pull/1283) Add Faker::Military [@jjasghar](https://github.com/jjasghar)

Expand Down
2 changes: 1 addition & 1 deletion test/test_array_sample_method_compat.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/test_helper.rb'
require_relative 'test_helper'

# when these tests are run under Ruby 1.8.7, they will use the
# self-defined Array#sample method in lib/extensions/array and will test whether it
Expand Down
2 changes: 1 addition & 1 deletion test/test_avatar.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerAvatar < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_bg_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestBgLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_ca_cat_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestCaCatLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_ca_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestCaLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_country_code.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestCountryCode < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_da_dk_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestDaDkLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_de_at_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestDeAtLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_de_ch_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestDeChLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_de_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestDeLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_determinism.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'
# rubocop:disable Security/Eval,Style/EvalWithLocation
class TestDeterminism < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_ee_locale.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEeLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_au_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnAuLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_au_ocker_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnAuOckerLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_ca_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnCaLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_gb_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnGbLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_ind_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnIndLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_ms_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnMsLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_nep_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnNepLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_ng_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnNgLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_nz_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnNzLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_pak_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnPakLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_sg_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnSgLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_ug_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnUgLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_en_us_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEnUsLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_es_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

LoadedEsYaml = %w[en es].each_with_object({}) do |locale, h|
h[locale] = YAML.load_file(File.expand_path(File.dirname(__FILE__) + "/../lib/locales/#{locale}.yml"))[locale]['faker']
Expand Down
2 changes: 1 addition & 1 deletion test/test_es_mx_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestEsMxLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_fa_locale.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFaLocale < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFaker < Test::Unit::TestCase
def setup; end
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_address.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerAddress < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_ancient.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerAncient < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_app.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerApp < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_appliance.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerAppliance < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_aqua_teen_hunger_force.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerAquaTeenHungerForce < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_artist.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerArtist < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_back_to_the_future.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerBackToTheFuture < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_bank.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerBank < Test::Unit::TestCase
IBAN_HEADER = '[A-Z]{2}[0-9]{2}'.freeze
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_beer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerBeer < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_birthday_in_leap_year.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerBirthdayInLeapYear < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_bitcoin.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerBitcoin < Test::Unit::TestCase
def test_address
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_book.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerBook < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_boolean.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'
require 'minitest/mock'

class TestFakerBoolean < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_bossa_nova.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerBossaNova < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_breaking_bad.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require File.expand_path(File.dirname(__FILE__) + '/test_helper')
require_relative 'test_helper'

class TestFakerBreakingBad < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_business.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/test_helper.rb'
require_relative 'test_helper'

class TestFakerBusiness < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_cannabis.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require File.expand_path(File.dirname(__FILE__) + '/test_helper')
require_relative 'test_helper'

class TestFakerCannabis < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_cat.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCat < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_char.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerChar < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_chuck_norris.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerChuckNorris < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_city.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/test_helper.rb'
require_relative 'test_helper'

class TestFakerCity < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_code.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/test_helper.rb'
require_relative 'test_helper'

class TestFakerCode < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_coffee.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCoffee < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_color.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerColor < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_commerce.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCommerce < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_community.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCommunity < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_company.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCompany < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_compass.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCompass < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_crypto.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCrypto < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_currency.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerCurrency < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_date.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerDate < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_demographic.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerDemographic < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_dessert.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerDessert < Test::Unit::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_device.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
require_relative 'test_helper'

class TestFakerDevice < Test::Unit::TestCase
def setup
Expand Down
Loading