مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
renaming factory girl => factory bot
هذا الالتزام موجود في:
@@ -3,7 +3,7 @@ ENV['POSTAL_CONFIG_ROOT'] = File.expand_path('../config', __FILE__)
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'spec_helper'
|
||||
require 'factory_girl'
|
||||
require 'factory_bot'
|
||||
require 'database_cleaner'
|
||||
|
||||
FACTORIES_EXCLUDED_FROM_LINT = []
|
||||
@@ -13,7 +13,7 @@ ActiveRecord::Migration.maintain_test_schema!
|
||||
RSpec.configure do |config|
|
||||
config.use_transactional_fixtures = true
|
||||
config.infer_spec_type_from_file_location!
|
||||
config.include FactoryGirl::Syntax::Methods
|
||||
config.include FactoryBot::Syntax::Methods
|
||||
config.include Postal::RspecHelpers
|
||||
|
||||
config.before(:suite) do
|
||||
@@ -21,7 +21,7 @@ RSpec.configure do |config|
|
||||
# the rest of the suite.
|
||||
begin
|
||||
DatabaseCleaner.start
|
||||
FactoryGirl.lint(FactoryGirl.factories.select { |f| !FACTORIES_EXCLUDED_FROM_LINT.include?(f.name.to_sym) })
|
||||
FactoryBot.lint(FactoryBot.factories.select { |f| !FACTORIES_EXCLUDED_FROM_LINT.include?(f.name.to_sym) })
|
||||
ensure
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
@@ -30,7 +30,7 @@ RSpec.configure do |config|
|
||||
# Because the mail databases don't use any transactions, all data left in the
|
||||
# database will be left there unless removed.
|
||||
DatabaseCleaner.start
|
||||
GLOBAL_SERVER = FactoryGirl.create(:server, :provision_database => true)
|
||||
GLOBAL_SERVER = FactoryBot.create(:server, :provision_database => true)
|
||||
end
|
||||
|
||||
config.after(:suite) do
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم