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