summaryrefslogtreecommitdiff
path: root/spec/support/legacy_record.rb
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2018-07-13 14:38:15 -0600
committermokha <mokha@cisco.com>2018-07-13 14:38:15 -0600
commit4a0e64d361491ec2bec995572b23e3f2e6920f15 (patch)
tree602f614170d7f35b9341633728a3f6dd5d395548 /spec/support/legacy_record.rb
parent4f24b872623f1a31587eb6c2a40f5d3d4c5121d4 (diff)
rollback legacy db transactions.main
Diffstat (limited to 'spec/support/legacy_record.rb')
-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