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
4545 end
4646 end
4747
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
5153
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
5460
55- expect { group . new . setup_fixtures } . to_not raise_error
61+ expect_to_pass ( group )
62+ end
5663 end
5764
5865 it "handles namespaced fixtures" do
You can’t perform that action at this time.
0 commit comments