2

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

4

1 回答 1

4

发现它在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

于 2014-03-29T15:24:16.983 回答