File tree 1 file changed +13
-6
lines changed 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,21 @@ module RSpec::Rails
39
39
end
40
40
end
41
41
42
- it "will allow #setup_fixture to run successfully" do
43
- group = RSpec ::Core ::ExampleGroup . describe do
44
- include FixtureSupport
42
+ context "with use_transactional_tests set to false" do
43
+ it "does not wrap the test in a transaction" do
44
+ allow ( RSpec . configuration ) . to receive ( :use_transactional_fixtures ) { true }
45
+ group = RSpec ::Core ::ExampleGroup . describe do
46
+ include FixtureSupport
45
47
46
- self . use_transactional_tests = false
47
- end
48
+ self . use_transactional_tests = false
49
+
50
+ it "doesn't run in transaction" do
51
+ expect ( ActiveRecord ::Base . connection . transaction_open? ) . to eq ( false )
52
+ end
53
+ end
48
54
49
- expect { group . new . setup_fixtures } . to_not raise_error
55
+ expect_to_pass ( group )
56
+ end
50
57
end
51
58
52
59
it "handles namespaced fixtures" do
You can’t perform that action at this time.
0 commit comments