مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
test: add tests for Server model
هذا الالتزام موجود في:
@@ -9,6 +9,7 @@ require "factory_bot"
|
||||
require "timecop"
|
||||
require "database_cleaner"
|
||||
require "webmock/rspec"
|
||||
require "shoulda-matchers"
|
||||
|
||||
DatabaseCleaner.allow_remote_database_url = true
|
||||
ActiveRecord::Base.logger = Logger.new("/dev/null")
|
||||
@@ -16,8 +17,17 @@ ActiveRecord::Base.logger = Logger.new("/dev/null")
|
||||
Dir[File.expand_path("factories/*.rb", __dir__)].each { |f| require f }
|
||||
Dir[File.expand_path("helpers/**/*.rb", __dir__)].each { |f| require f }
|
||||
|
||||
ActionMailer::Base.delivery_method = :test
|
||||
|
||||
ActiveRecord::Migration.maintain_test_schema!
|
||||
|
||||
Shoulda::Matchers.configure do |config|
|
||||
config.integrate do |with|
|
||||
with.test_framework :rspec
|
||||
with.library :rails
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.use_transactional_fixtures = true
|
||||
config.infer_spec_type_from_file_location!
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم