spec/spec_helper.rb in sequel-rails-0.9.3 vs spec/spec_helper.rb in sequel-rails-0.9.4
- old
+ new
@@ -20,11 +20,15 @@
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run_excluding rspec_exclusions
config.around :each do |example|
- Sequel::Model.db.transaction(:rollback => :always) do
+ if example.metadata[:no_transaction]
example.run
+ else
+ Sequel::Model.db.transaction(:rollback => :always) do
+ example.run
+ end
end
end
[:expect_with, :mock_with].each do |method|
config.send(method, :rspec) do |c|