From b25f6f6c55d2dd28c507d60fa6b6e7f4a07e828f Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Thu, 30 Nov 2017 21:39:12 -0500 Subject: [PATCH] Update to renamed factory_bot_rails gem **Why**: Factory Girl has been renamed to Factory Bot https://github.com/thoughtbot/factory_bot/blob/master/NAME.md --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- spec/factories/app_settings.rb | 2 +- spec/factories/authorizations.rb | 2 +- spec/factories/events.rb | 2 +- spec/factories/identities.rb | 2 +- spec/factories/otp_presenter.rb | 2 +- spec/factories/profiles.rb | 2 +- spec/factories/service_providers.rb | 2 +- spec/factories/users.rb | 2 +- spec/factories/usps_confirmation_codes.rb | 2 +- spec/rails_helper.rb | 2 +- spec/support/factory_girl.rb | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 96024378e4d..f479d5bfeb4 100644 --- a/Gemfile +++ b/Gemfile @@ -101,7 +101,7 @@ group :test do gem 'coffee-script' gem 'database_cleaner' gem 'email_spec' - gem 'factory_girl_rails' + gem 'factory_bot_rails' gem 'fakefs', require: 'fakefs/safe' gem 'faker' gem 'poltergeist' diff --git a/Gemfile.lock b/Gemfile.lock index 40472c41255..9ddf41a0ca7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -260,10 +260,10 @@ GEM activesupport (>= 4.0, < 6) excon (0.58.0) execjs (2.7.0) - factory_girl (4.8.0) + factory_bot (4.8.2) activesupport (>= 3.0.0) - factory_girl_rails (4.8.0) - factory_girl (~> 4.8.0) + factory_bot_rails (4.8.2) + factory_bot (~> 4.8.2) railties (>= 3.0.0) fakefs (0.11.2) faker (1.8.4) @@ -696,7 +696,7 @@ DEPENDENCIES email_spec equifax! exception_notification - factory_girl_rails + factory_bot_rails fakefs faker fasterer diff --git a/spec/factories/app_settings.rb b/spec/factories/app_settings.rb index 8e620e4e81a..86b0291b1fb 100644 --- a/spec/factories/app_settings.rb +++ b/spec/factories/app_settings.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :app_setting do name 'MySettingName' value 'MySettingValue' diff --git a/spec/factories/authorizations.rb b/spec/factories/authorizations.rb index a371ebe5959..bb59a4c0947 100644 --- a/spec/factories/authorizations.rb +++ b/spec/factories/authorizations.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :authorization do provider 'saml' uid '1234' diff --git a/spec/factories/events.rb b/spec/factories/events.rb index 979499c2c13..e9c07e39e2b 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :event do user_id 1 event_type :account_created diff --git a/spec/factories/identities.rb b/spec/factories/identities.rb index 5204c275a7a..347ba5135d9 100644 --- a/spec/factories/identities.rb +++ b/spec/factories/identities.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :identity do uuid { SecureRandom.uuid } service_provider 'https://serviceprovider.com' diff --git a/spec/factories/otp_presenter.rb b/spec/factories/otp_presenter.rb index 43e6fe112fc..e30038bffb1 100644 --- a/spec/factories/otp_presenter.rb +++ b/spec/factories/otp_presenter.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :generic_otp_presenter, class: Hash do otp_delivery_preference 'sms' phone_number '***-***-1212' diff --git a/spec/factories/profiles.rb b/spec/factories/profiles.rb index 35d260ff0c2..f9a794256e6 100644 --- a/spec/factories/profiles.rb +++ b/spec/factories/profiles.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :profile do association :user, factory: %i[user signed_up] transient do diff --git a/spec/factories/service_providers.rb b/spec/factories/service_providers.rb index 434703fbc71..58cb0799fe0 100644 --- a/spec/factories/service_providers.rb +++ b/spec/factories/service_providers.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do Faker::Config.locale = :en factory :service_provider do diff --git a/spec/factories/users.rb b/spec/factories/users.rb index fac8cf7ddb1..9be92510ea2 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do Faker::Config.locale = :en factory :user do diff --git a/spec/factories/usps_confirmation_codes.rb b/spec/factories/usps_confirmation_codes.rb index fde6215e92c..5ddf28cf118 100644 --- a/spec/factories/usps_confirmation_codes.rb +++ b/spec/factories/usps_confirmation_codes.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do Faker::Config.locale = :en factory :usps_confirmation_code do diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 1405719dcbf..35c5e9e30d0 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -3,7 +3,7 @@ require File.expand_path('../../config/environment', __FILE__) require 'rspec/rails' require 'email_spec' -require 'factory_girl' +require 'factory_bot' require 'sidekiq/testing' # Checks for pending migrations before tests are run. diff --git a/spec/support/factory_girl.rb b/spec/support/factory_girl.rb index eec437fb3aa..c7890e49c66 100644 --- a/spec/support/factory_girl.rb +++ b/spec/support/factory_girl.rb @@ -1,3 +1,3 @@ RSpec.configure do |config| - config.include FactoryGirl::Syntax::Methods + config.include FactoryBot::Syntax::Methods end