مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
renaming factory girl => factory bot
هذا الالتزام موجود في:
2
Gemfile
2
Gemfile
@@ -46,6 +46,6 @@ group :development do
|
||||
gem 'annotate'
|
||||
gem 'rspec'
|
||||
gem 'rspec-rails'
|
||||
gem "factory_girl_rails", "~> 4.0"
|
||||
gem "factory_bot_rails", "~> 4.0"
|
||||
gem "database_cleaner"
|
||||
end
|
||||
|
||||
@@ -84,10 +84,10 @@ GEM
|
||||
encrypto_signo (1.0.0)
|
||||
erubi (1.8.0)
|
||||
execjs (2.7.0)
|
||||
factory_girl (4.9.0)
|
||||
factory_bot (4.11.1)
|
||||
activesupport (>= 3.0.0)
|
||||
factory_girl_rails (4.9.0)
|
||||
factory_girl (~> 4.9.0)
|
||||
factory_bot_rails (4.11.1)
|
||||
factory_bot (~> 4.11.1)
|
||||
railties (>= 3.0.0)
|
||||
faraday (0.15.2)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
@@ -262,7 +262,7 @@ DEPENDENCIES
|
||||
database_cleaner
|
||||
dynamic_form
|
||||
encrypto_signo
|
||||
factory_girl_rails (~> 4.0)
|
||||
factory_bot_rails (~> 4.0)
|
||||
foreman
|
||||
gelf
|
||||
haml
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
# index_domains_on_uuid (uuid)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
|
||||
factory :domain do
|
||||
association :owner, :factory => :user
|
||||
sequence(:name) { |n| "example#{n}.com" }
|
||||
verification_method 'DNS'
|
||||
verified_at Time.now
|
||||
verification_method { 'DNS' }
|
||||
verified_at { Time.now }
|
||||
end
|
||||
|
||||
factory :organization_domain, :parent => :domain do
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
# index_organizations_on_uuid (uuid)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
|
||||
factory :organization do
|
||||
name "Acme Inc"
|
||||
name { "Acme Inc" }
|
||||
sequence(:permalink) { |n| "org#{n}" }
|
||||
association :owner, :factory => :user
|
||||
end
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
# index_servers_on_uuid (uuid)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
|
||||
factory :server do
|
||||
association :organization
|
||||
name "Mail Server"
|
||||
mode "Live"
|
||||
provision_database false
|
||||
name { "Mail Server" }
|
||||
mode { "Live" }
|
||||
provision_database { false }
|
||||
sequence(:permalink) { |n| "server#{n}" }
|
||||
end
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
# excluded_click_domains :text(65535)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
|
||||
factory :track_domain do
|
||||
name "click"
|
||||
dns_status 'OK'
|
||||
name { "click" }
|
||||
dns_status { 'OK' }
|
||||
association :server
|
||||
|
||||
after(:build) do |track_domain|
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
# index_users_on_uuid (uuid)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
|
||||
factory :user do
|
||||
first_name "John"
|
||||
last_name "Doe"
|
||||
password "passw0rd"
|
||||
email_verified_at Time.now
|
||||
first_name { "John" }
|
||||
last_name { "Doe" }
|
||||
password { "passw0rd" }
|
||||
email_verified_at { Time.now }
|
||||
sequence(:email_address) { |n| "user#{n}@example.com" }
|
||||
end
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم