summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/legacy_record.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/support/legacy_record.rb b/spec/support/legacy_record.rb
new file mode 100644
index 0000000..bdbab33
--- /dev/null
+++ b/spec/support/legacy_record.rb
@@ -0,0 +1,9 @@
+RSpec.configure do |config|
+ config.before(:each) do
+ LegacyRecord.connection.begin_transaction joinable: false
+ end
+
+ config.after(:each) do
+ LegacyRecord.connection.rollback_transaction
+ end
+end