Added manual database cleaning + Api log spec updates

This commit is contained in:
Priit Tark 2015-01-26 17:55:27 +02:00
parent 06d9cbe2f0
commit 221c62c846
3 changed files with 30 additions and 37 deletions

View file

@ -38,25 +38,25 @@ RSpec.configure do |config|
DatabaseCleaner.strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
# config.before(:each) do
# DatabaseCleaner.strategy = :transaction
# end
config.before(:all, epp: true) do
ActiveRecord::Base.establish_connection :api_log_test
DatabaseCleaner.clean
# config.before(:all, epp: true) do
# ActiveRecord::Base.establish_connection :api_log_test
# DatabaseCleaner.clean
ActiveRecord::Base.establish_connection :test
DatabaseCleaner.clean
end
# ActiveRecord::Base.establish_connection :test
# DatabaseCleaner.clean
# end
config.before(:each, js: true) do
DatabaseCleaner.strategy = :truncation
end
# config.before(:each, js: true) do
# DatabaseCleaner.strategy = :truncation
# end
config.before(:each, type: :request) do
DatabaseCleaner.strategy = :truncation
end
# config.before(:each, type: :request) do
# DatabaseCleaner.strategy = :truncation
# end
Capybara.javascript_driver = :poltergeist