title: Transaction vs Truncation Database Cleaner
body: <p>Recently I had a problem with one of my cucumber scenarios. Certain entries in my test database were disappearing whilst the feature was running. I solved the problem by changing the line</p>
  
  <pre><code>DatabaseCleaner.strategy = :transaction
  </code></pre>
  
  <p>to</p>
  
  <pre><code>DatabaseCleaner.strategy = :truncation
  </code></pre>
  
  <p>I'm not sure why that helped. There is a table on the database cleaners gem webpage, but it dosen't really say what the two terms mean. Any help on understanding the difference between the two concepts would be great.</p>