Skip to content

Commit

Permalink
Kapitulation
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWalkingLeek committed Sep 19, 2024
1 parent 63133ae commit 3a66d7a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/hitobito_tenants/apartment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
# Rails will use to connect to your database.
#
# At the time of this writing, the pool-size is 20
config.parallel_migration_threads = 15
config.parallel_migration_threads = 0
end

module Apartment
Expand Down
28 changes: 18 additions & 10 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,30 @@
require File.expand_path("../../hitobito/config/environment", __dir__)
require "rspec/rails"

require File.join(ENV['APP_ROOT'], 'spec', 'spec_helper.rb')
ENV["RAILS_ENV"] = "test"
ENV["RAILS_GROUPS"] = "assets"
ENV["RAILS_STRUCTURED_ADDRESSES"] = "1"
ENV["RAILS_ADDRESS_MIGRATION"] = "0"

ActiveRecord::Migration.suppress_messages do
begin
previous_seed_quietness = SeedFu.quiet
SeedFu.quiet = true

Wagons.all.each do |wagon|
wagon.migrate
wagon.load_seed
if ActiveRecord::Base.maintain_test_schema
ActiveRecord::Migration.maintain_test_schema!
ActiveRecord::Migration.load_schema_if_pending!
begin
previous_seed_quietness = SeedFu.quiet
SeedFu.quiet = true
Wagons.all.each do |wagon|
wagon.migrate
wagon.load_seed
end
ensure
SeedFu.quiet = previous_seed_quietness
end
ensure
SeedFu.quiet = previous_seed_quietness
end
end

require File.join(ENV['APP_ROOT'], 'spec', 'spec_helper.rb')

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[HitobitoTenants::Wagon.root.join('spec/support/**/*.rb')].sort.each { |f| require f }
Expand Down

0 comments on commit 3a66d7a

Please sign in to comment.