Why after_commit not running even with use_transactional_fixtures = false

后端 未结 5 2366
悲哀的现实
悲哀的现实 2021-02-19 03:03

Transactional fixtures in rspec prevent after_commit from being called, but even when I disable them with

RSpec.configure do |config|
  config.use_transactional_         


        
5条回答
  •  星月不相逢
    2021-02-19 03:54

    If you're using database_cleaner you'll still run into this. I'm using the test_after_commit gem, and that seems to do the trick for me.

提交回复
热议问题