For each step of test occurs 2 lines:
WARNING: there is already a transaction in progress
NOTICE: there is no transaction in progress
With Spork lines following triples:
NOTICE: there is no transaction in progress
NOTICE: there is no transaction in progress
NOTICE: there is no transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
I don't know maybe it's important, just warned. GemFile:
group :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'spork-rails'
gem 'capybara'
gem 'database_cleaner'
end
all customized, so there is no need for develop group, and it not helps anyway. this is spec_helper.I found, that it is PostgreSQL feature, but I could not find how to fix it. I will be grateful for the assistance
In spec_helper.rb
config.use_transactional_examples = false #factoryGirl
config.use_transactional_fixtures = false #fixtures
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end
In database.yml
test:
adapter: postgresql
encoding: unicode
host: localhost
database: myapp_test
username: my_username
password:
allow_concurrency: true
pool: 5
min_messages: error
Even if you have set the min_messages option, you may still see console output like the following:
WARNING: there is already a transaction in progress
Edit the file
/opt/local/var/db/postgresql92/defaultdb/postgresql.conf
and set the following:
client_min_messages = error
Everything should now be running smoothly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With