【问题标题】:What is the default value of use_transactional_fixtures in rspec?rspec 中 use_transactional_fixtures 的默认值是多少?
【发布时间】:2014-03-29 14:51:00
【问题描述】:

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

【问题讨论】:

    标签: ruby rspec database-cleaner


    【解决方案1】:

    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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-20
      • 2018-07-12
      • 2015-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-05
      • 1970-01-01
      相关资源
      最近更新 更多