mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Refactor keyrelay specs
This commit is contained in:
parent
418695ccc7
commit
bfb8670233
3 changed files with 154 additions and 140 deletions
|
@ -31,13 +31,11 @@ RSpec.configure do |config|
|
|||
# instead of true.
|
||||
config.use_transactional_fixtures = false
|
||||
|
||||
config.before(:suite) do
|
||||
config.before(:all) do
|
||||
ActiveRecord::Base.establish_connection :api_log_test
|
||||
DatabaseCleaner.strategy = :deletion
|
||||
DatabaseCleaner.clean
|
||||
ActiveRecord::Base.establish_connection :test
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
|
@ -48,6 +46,22 @@ RSpec.configure do |config|
|
|||
DatabaseCleaner.strategy = :truncation
|
||||
end
|
||||
|
||||
config.before(:all, epp: true) do
|
||||
ActiveRecord::Base.establish_connection :api_log_test
|
||||
DatabaseCleaner.clean
|
||||
|
||||
ActiveRecord::Base.establish_connection :test
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
config.after(:all, epp: true) do
|
||||
ActiveRecord::Base.establish_connection :api_log_test
|
||||
DatabaseCleaner.clean
|
||||
|
||||
ActiveRecord::Base.establish_connection :test
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
config.before(:each, js: true) do
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue