From 64d8f05bdd2effe224d6e82381d24400aff316ef Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Mon, 3 Sep 2018 20:48:28 +0200 Subject: [PATCH] Update FactoryBot strings & urls --- .rubocop_todo.yml | 2 +- CONTRIBUTING.md | 2 +- lib/tasks/{factory_girl.rake => factory_bot.rake} | 4 ++-- lib/tasks/migrate_config.rake | 2 +- spec/factories/answer.rb | 2 +- spec/factories/campaigns.rb | 2 +- spec/factories/cfps.rb | 2 +- spec/factories/comments.rb | 2 +- spec/factories/commercials.rb | 2 +- spec/factories/conferences.rb | 2 +- spec/factories/email_settings.rb | 2 +- spec/factories/event_schedule.rb | 2 +- spec/factories/event_types.rb | 2 +- spec/factories/event_users.rb | 2 +- spec/factories/events.rb | 2 +- spec/factories/events_registrations.rb | 2 +- spec/factories/lodgings.rb | 2 +- spec/factories/openid.rb | 2 +- spec/factories/programs.rb | 2 +- spec/factories/qanswer.rb | 2 +- spec/factories/question.rb | 2 +- spec/factories/question_type.rb | 2 +- spec/factories/registration.rb | 2 +- spec/factories/registration_periods.rb | 2 +- spec/factories/rooms.rb | 2 +- spec/factories/schedule.rb | 2 +- spec/factories/splashpages.rb | 2 +- spec/factories/sponsors.rb | 2 +- spec/factories/sponsorship_levels.rb | 2 +- spec/factories/targets.rb | 2 +- spec/factories/users.rb | 2 +- spec/factories/venues.rb | 2 +- spec/factories/visits.rb | 2 +- spec/support/{factory_girl.rb => factory_bot.rb} | 0 34 files changed, 34 insertions(+), 34 deletions(-) rename lib/tasks/{factory_girl.rake => factory_bot.rake} (75%) rename spec/support/{factory_girl.rb => factory_bot.rb} (100%) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3d93656f..61bc6539 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -926,7 +926,7 @@ Style/StringLiterals: - 'Vagrantfile' - 'lib/tasks/dump_db.rake' - 'lib/tasks/events_registrations.rake' - - 'lib/tasks/factory_girl.rake' + - 'lib/tasks/factory_bot.rake' - 'lib/tasks/user.rake' # Offense count: 14 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 271e372b..0a9b5cdc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,7 +95,7 @@ vagrant exec overcommit install You can read through the current enabled hooks in the `.overcommit.yml` file. ### Test Suite -We are using [rspec](http://rspec.info/)+[capybara](http://teamcapybara.github.io/capybara/)+[factory girl](https://github.com/thoughtbot/factory_girl) as a test suite. You can run it locally +We are using [rspec](http://rspec.info/)+[capybara](http://teamcapybara.github.io/capybara/)+[factory bot](https://github.com/thoughtbot/factory_bot) as a test suite. You can run it locally ```shell vagrant exec bundle exec rspec diff --git a/lib/tasks/factory_girl.rake b/lib/tasks/factory_bot.rake similarity index 75% rename from lib/tasks/factory_girl.rake rename to lib/tasks/factory_bot.rake index a95745ae..177d2f09 100644 --- a/lib/tasks/factory_girl.rake +++ b/lib/tasks/factory_bot.rake @@ -1,6 +1,6 @@ # frozen_string_literal: true -namespace :factory_girl do +namespace :factory_bot do desc "Verify that all FactoryBot factories are valid" task lint: :environment do if Rails.env.test? @@ -11,7 +11,7 @@ namespace :factory_girl do DatabaseCleaner.clean end else - system("bundle exec rake factory_girl:lint RAILS_ENV='test'") + system("bundle exec rake factory_bot:lint RAILS_ENV='test'") end end end diff --git a/lib/tasks/migrate_config.rake b/lib/tasks/migrate_config.rake index 859d109b..9617dafe 100644 --- a/lib/tasks/migrate_config.rake +++ b/lib/tasks/migrate_config.rake @@ -28,7 +28,7 @@ namespace :data do dot_env.puts "OSEM_ICHAIN_ENABLED=\"#{CONFIG['authentication']['ichain']['enabled']}\"" if CONFIG.has_key?(:authentication) dot_env.puts "OSEM_TRANSIFEX_APIKEY=\"#{CONFIG['transifex_live_api_key']}\"" dot_env.puts "OSEM_ERRBIT_HOST=\"#{CONFIG['errbit_host']}\"" - dot_env.puts "OSEM_FACTORY_LINT=\"#{CONFIG['factory_girl_lint']}\"" + dot_env.puts "OSEM_FACTORY_LINT=\"#{CONFIG['factory_bot_lint']}\"" dot_env.puts "OSEM_SMTP_ADDRESS=\"#{CONFIG['mail_address']}\"" dot_env.puts "OSEM_SMTP_PORT=\"#{CONFIG['mail_port']}\"" dot_env.puts "OSEM_SMTP_USERNAME=\"#{CONFIG['mail_username']}\"" diff --git a/spec/factories/answer.rb b/spec/factories/answer.rb index e9fe3a0d..8b50ba7f 100644 --- a/spec/factories/answer.rb +++ b/spec/factories/answer.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :answer do diff --git a/spec/factories/campaigns.rb b/spec/factories/campaigns.rb index f15bed6e..e71d9c83 100644 --- a/spec/factories/campaigns.rb +++ b/spec/factories/campaigns.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :campaign do diff --git a/spec/factories/cfps.rb b/spec/factories/cfps.rb index 2d8e00e6..aa97ce43 100644 --- a/spec/factories/cfps.rb +++ b/spec/factories/cfps.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :cfp do diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb index b5475c37..432cdb61 100644 --- a/spec/factories/comments.rb +++ b/spec/factories/comments.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :comment do diff --git a/spec/factories/commercials.rb b/spec/factories/commercials.rb index d0ee7f99..e6ae1116 100644 --- a/spec/factories/commercials.rb +++ b/spec/factories/commercials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :commercial do diff --git a/spec/factories/conferences.rb b/spec/factories/conferences.rb index fc95a5a7..eab4f7bd 100644 --- a/spec/factories/conferences.rb +++ b/spec/factories/conferences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :conference do diff --git a/spec/factories/email_settings.rb b/spec/factories/email_settings.rb index 635c310c..d1a612fd 100644 --- a/spec/factories/email_settings.rb +++ b/spec/factories/email_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :email_settings do diff --git a/spec/factories/event_schedule.rb b/spec/factories/event_schedule.rb index 937d0f80..4a96d4a0 100644 --- a/spec/factories/event_schedule.rb +++ b/spec/factories/event_schedule.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :event_schedule do diff --git a/spec/factories/event_types.rb b/spec/factories/event_types.rb index 5cce1f53..0cd6b884 100644 --- a/spec/factories/event_types.rb +++ b/spec/factories/event_types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :event_type do diff --git a/spec/factories/event_users.rb b/spec/factories/event_users.rb index f0f5aafb..dec632e7 100644 --- a/spec/factories/event_users.rb +++ b/spec/factories/event_users.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :event_user do diff --git a/spec/factories/events.rb b/spec/factories/events.rb index 6e5a6b5d..8061f61c 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :event do diff --git a/spec/factories/events_registrations.rb b/spec/factories/events_registrations.rb index 5df72c3b..303b1996 100644 --- a/spec/factories/events_registrations.rb +++ b/spec/factories/events_registrations.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :events_registration do diff --git a/spec/factories/lodgings.rb b/spec/factories/lodgings.rb index 0bc2338f..76f74f0a 100644 --- a/spec/factories/lodgings.rb +++ b/spec/factories/lodgings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :lodging do diff --git a/spec/factories/openid.rb b/spec/factories/openid.rb index db204194..81b6ac9b 100644 --- a/spec/factories/openid.rb +++ b/spec/factories/openid.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :openid do diff --git a/spec/factories/programs.rb b/spec/factories/programs.rb index eec95af8..6ebabb4a 100644 --- a/spec/factories/programs.rb +++ b/spec/factories/programs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :program do diff --git a/spec/factories/qanswer.rb b/spec/factories/qanswer.rb index dc1b1916..f5e0abf3 100644 --- a/spec/factories/qanswer.rb +++ b/spec/factories/qanswer.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :qanswer do diff --git a/spec/factories/question.rb b/spec/factories/question.rb index 2ba2e8a1..0d78b820 100644 --- a/spec/factories/question.rb +++ b/spec/factories/question.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :question do diff --git a/spec/factories/question_type.rb b/spec/factories/question_type.rb index 24c0451b..70ddff81 100644 --- a/spec/factories/question_type.rb +++ b/spec/factories/question_type.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :question_type do diff --git a/spec/factories/registration.rb b/spec/factories/registration.rb index 6ef459c2..d55fed56 100644 --- a/spec/factories/registration.rb +++ b/spec/factories/registration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :registration do diff --git a/spec/factories/registration_periods.rb b/spec/factories/registration_periods.rb index 0d05fb70..7127c132 100644 --- a/spec/factories/registration_periods.rb +++ b/spec/factories/registration_periods.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :registration_period do diff --git a/spec/factories/rooms.rb b/spec/factories/rooms.rb index 08f41ff4..978c3a5b 100644 --- a/spec/factories/rooms.rb +++ b/spec/factories/rooms.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :room do name { "Room #{Faker::Address.country}" } diff --git a/spec/factories/schedule.rb b/spec/factories/schedule.rb index 09a4a8aa..9c5e5c8b 100644 --- a/spec/factories/schedule.rb +++ b/spec/factories/schedule.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :schedule do diff --git a/spec/factories/splashpages.rb b/spec/factories/splashpages.rb index 57b91d4c..aff30334 100644 --- a/spec/factories/splashpages.rb +++ b/spec/factories/splashpages.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :splashpage do diff --git a/spec/factories/sponsors.rb b/spec/factories/sponsors.rb index 305711f5..d2cd8db5 100644 --- a/spec/factories/sponsors.rb +++ b/spec/factories/sponsors.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :sponsor do diff --git a/spec/factories/sponsorship_levels.rb b/spec/factories/sponsorship_levels.rb index a49f1281..8778e018 100644 --- a/spec/factories/sponsorship_levels.rb +++ b/spec/factories/sponsorship_levels.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :sponsorship_level do diff --git a/spec/factories/targets.rb b/spec/factories/targets.rb index 2756e828..8d4aa0ca 100644 --- a/spec/factories/targets.rb +++ b/spec/factories/targets.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :target do diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 67996edb..ea75fc6a 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot # It is a feature of our app that first signed up user is admin. This property # is set in a before create callback `setup_role` in user model. diff --git a/spec/factories/venues.rb b/spec/factories/venues.rb index 45138791..91c6dc36 100644 --- a/spec/factories/venues.rb +++ b/spec/factories/venues.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :venue do name { "#{Faker::Company.name} Office" } diff --git a/spec/factories/visits.rb b/spec/factories/visits.rb index c756c4a7..1da2b293 100644 --- a/spec/factories/visits.rb +++ b/spec/factories/visits.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Read about factories at https://github.com/thoughtbot/factory_girl +# Read about factories at https://github.com/thoughtbot/factory_bot FactoryBot.define do factory :visit do diff --git a/spec/support/factory_girl.rb b/spec/support/factory_bot.rb similarity index 100% rename from spec/support/factory_girl.rb rename to spec/support/factory_bot.rb