Only seed tenants when necessary in tests
On my machine, seeding a tenant takes about one second, so skipping this action when it isn't necessary makes tests creating tenants faster (although creating a tenant still takes about 3-4 seconds on my machine).
This commit is contained in:
@@ -117,6 +117,14 @@ RSpec.configure do |config|
|
||||
Delayed::Worker.delay_jobs = false
|
||||
end
|
||||
|
||||
config.before(:each, :seed_tenants) do
|
||||
Apartment.seed_after_create = true
|
||||
end
|
||||
|
||||
config.after(:each, :seed_tenants) do
|
||||
Apartment.seed_after_create = false
|
||||
end
|
||||
|
||||
config.before(:each, :small_window) do
|
||||
@window_size = Capybara.current_window.size
|
||||
Capybara.current_window.resize_to(639, 479)
|
||||
|
||||
Reference in New Issue
Block a user