When I starting testing my Sequel models using RSpec I was getting
failures because the database was being populated and not cleared from
test to test. I found some post somewhere that said to add the
following to my spec_helper.rb:
RSpec.configure do |config|
config.around(:each) do |example|
Sequel::DATABASES.first.transaction do
example.run
raise Sequel::Error::Rollback
end
end
# other configuration ...
end
Is this the recommended way to do this? The config.fixture_path and
config.use_transactional_fixtures options both don't seem to work with
Sequel which is unfortunate. Or am I not configuring something
correctly?
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.