Re: [rspec-users] How to run example group in transaction

2011-03-04 Thread Jim Morris
In your spec_helper... RSpec.configure do |config| # setup transactional factory for sequel, when running transactional tests config.around(:each, :transactional => true) do |example| Sequel::DATABASES.first.transaction do example.run raise Sequel::Error::Rollback end en

[rspec-users] How to run example group in transaction

2011-03-04 Thread Zhi-Qiang Lei
Dear All, I want to wrap my example group in transaction to avoid record being created. How should I do? My rspec is 2.5.1, and ORM is Sequal. This way does not work for me. Thanks. class RSpec::Core::ExampleGroup def self.run(reporter) DB.transaction { super(reporter); raise(Sequel::Erro