fixtury 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fixtury/test_hooks.rb +9 -2
- data/lib/fixtury/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d422110eda024f73368d6d4e244f909fcbc0b288a223df00e7b527c18f551b13
|
|
4
|
+
data.tar.gz: 440dd84ef120db60bd9cad4bcdac952e43c61c915199801c27023c95775725c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b7c93a1dc5781514337168f86407a0db1c05b0697df2cfb2a595b7766f02f7fcf762b5a1102984e1b18bfcaaaa02d756128c6af4bbb2072a99c13f99809d068
|
|
7
|
+
data.tar.gz: 2fad96dd5f9aa75f8af8f0bfc62e15864d3fd70289dc353b8431fee1362bcd53842261b37b5fcba58d583177f9ef7aa0bea4426d81ddd8ab13b097ab76ff03d0
|
data/lib/fixtury/test_hooks.rb
CHANGED
|
@@ -130,7 +130,7 @@ module Fixtury
|
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
def setup_fixtury_fixtures
|
|
133
|
-
return unless
|
|
133
|
+
return unless fixtury_use_transactions?
|
|
134
134
|
|
|
135
135
|
clear_expired_fixtury_fixtures!
|
|
136
136
|
load_all_fixtury_fixtures!
|
|
@@ -141,7 +141,7 @@ module Fixtury
|
|
|
141
141
|
end
|
|
142
142
|
|
|
143
143
|
def teardown_fixtury_fixtures
|
|
144
|
-
return unless
|
|
144
|
+
return unless fixtury_use_transactions?
|
|
145
145
|
|
|
146
146
|
fixtury_database_connections.each(&:rollback_transaction)
|
|
147
147
|
end
|
|
@@ -158,5 +158,12 @@ module Fixtury
|
|
|
158
158
|
end
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
+
def fixtury_use_transactions?
|
|
162
|
+
return use_transactional_tests if respond_to?(:use_transactional_tests)
|
|
163
|
+
return use_transactional_fixtures if respond_to?(:use_transactional_fixtures)
|
|
164
|
+
|
|
165
|
+
true
|
|
166
|
+
end
|
|
167
|
+
|
|
161
168
|
end
|
|
162
169
|
end
|
data/lib/fixtury/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fixtury
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Nelson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-10-
|
|
11
|
+
date: 2020-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: autotest
|