title: Rspec, Cucumber: best speed database clean strategy
body: <p>I would like to increase the speed of my tests.</p>
  
  <ol>
  <li>Should I use <code>use_transactional_fixtures</code> or go with the <code>database_cleaner</code> gem?</li>
  <li>Which database_cleaner strategy is the best? I noticed that after migration from <code>:truncation</code> to <code>:transaction</code> my more than 800 examples run about 4 times faster!</li>
  <li>Should I turn off <code>use_transactional_fixtures</code> when I use database_cleaner <code>:transaction</code>?</li>
  <li>Is it true that the best strategy for rack_test is <code>:transaction</code>?</li>
  <li>What is the best practices for changing strategy on the fly from <code>:transaction</code> to <code>:truncation</code> when using selenium or <a href="https://github.com/bernerdschaefer/akephalos" rel="noreferrer">akephalos</a>?</li>
  </ol>
  
  <p>P.S. Mysql, Rails 3, Rspec2, Cucumber </p>
  
  <p>P.P.S. I know about <a href="https://github.com/timcharper/spork" rel="noreferrer">spork</a> and <a href="https://github.com/grosser/parallel_tests" rel="noreferrer">parallel_test</a> and using them. But they are offtopic. For example, Spork save about 15-20 sec on whole suite run, but changing from <code>:transaction</code> to <code>:truncation</code> dramatically increase running time from 3.5 to 13.5 minutes (10 minutes difference).</p>