How to turn off database_cleaner only for request specs

86 views
Skip to first unread message

Цветелина Борисова

unread,
Mar 6, 2013, 10:32:15 AM3/6/13
to database...@googlegroups.com
I have configured database_cleaner and everything works but I don't want to use database_cleaner when I run request specs. I looked here: https://github.com/bmabey/database_cleaner but I couldn't find how to do it. Can someone help me?

This is what is in my spec_helper.rb:

    config.before(:suite) do
      DatabaseCleaner.strategy = :transaction
      DatabaseCleaner.clean_with(:truncation)
    end

    config.before(:each) do
      DatabaseCleaner.start
    end

    config.after(:each) do
      DatabaseCleaner.clean
    end
Reply all
Reply to author
Forward
0 new messages