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 @@ -39,14 +39,21 @@ module RSpec::Rails
3939 end
4040 end
4141
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
4547
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
4854
49- expect { group . new . setup_fixtures } . to_not raise_error
55+ expect_to_pass ( group )
56+ end
5057 end
5158
5259 it "handles namespaced fixtures" do
You can’t perform that action at this time.
0 commit comments