gpt4 book ai didi

ruby - rspec 中 use_transactional_fixtures 的默认值是多少?

转载 作者:太空宇宙 更新时间:2023-11-03 18:18:17 29 4
gpt4 key购买 nike

我问这个是因为在我目前阅读的关于 rspec 和 database_cleaner gem 的文章中,我看到了 config.use_transactional_fixtures = false 这行。如果我使用 database_cleaner gem,我不能只删除这一行吗?

最佳答案

rspec-core 中找到:

  # Used internally and by extension frameworks like rspec-rails, so they
# can add config settings that are domain specific. For example:
#
# RSpec.configure do |c|
# c.add_setting :use_transactional_fixtures,
# :default => true,
# :alias_with => :use_transactional_examples
# end

所以,默认是true

关于ruby - rspec 中 use_transactional_fixtures 的默认值是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22732567/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com