1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

renaming factory girl => factory bot

هذا الالتزام موجود في:
Adam Cooke
2019-03-14 10:45:08 +00:00
الأصل 145a5f3cba
التزام f56dac2284
8 ملفات معدلة مع 26 إضافات و26 حذوفات

عرض الملف

@@ -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