rspec中use_transactional_fixtures的默认值是多少?

时间:2014-03-29 14:51:01

标签: ruby rspec database-cleaner

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

1 个答案:

答案 0 :(得分:3)

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