Rails 3 and Rspec 2 turn off transactional fixtures for individual tests

前端 未结 3 477
感情败类
感情败类 2021-02-05 17:53

I am in the process of upgrading my application to Rails 3. I started using Rspec 2 with Rails 3. I need to turn off transactional fixtures for some of my rspec tests. Prior

3条回答
  •  时光取名叫无心
    2021-02-05 18:18

    I'm looking for the answer to this question, came across this blog entry

    It suggests to declare inside the describe block

    describe "xxx" do
      self.use_transactional_fixtures = false
      ...
    

    I tried it with Rails 3.0.7 with RSpec 2.6.3, and looks like working.

提交回复
热议问题