factory_girl + rspec doesn't seem to roll back changes after each example

前端 未结 7 2068
暗喜
暗喜 2021-02-07 05:39

Similar to the problem described here: http://rpheath.com/posts/411-how-to-use-factory-girl-with-rspec

in Short (shorten\'d code):

spec_helper:

c         


        
7条回答
  •  滥情空心
    2021-02-07 06:46

    Things i think off:

    • do you use rake spec to run your testsuite: that builds up the database from scratch (to make sure nothing is sticking)
    • do you use, anywhere, a before (:all) ? Because whatever you create inside a before :all should be deleted again in a after :all or it keeps on existing.

提交回复
热议问题