title: About my way to truncate tables in my test DB
body: <p>In my <strong>Rails</strong> app development, When I run my <strong>Rspec test</strong>, I need to <strong>truncate all tables in my test database</strong> in <code>after(:all)</code> . </p>
  
  <p>(That's to clean up all data in every table in test db)</p>
  
  <p>To approach this, I am thinking to first get all <code>ActiveRecord</code> <strong>models</strong> which represent the <strong>tables in test db</strong>, then for each <strong>model</strong>, I use <code>delete_all</code> method to clean up each table. Thant's something like:</p>
  
  <pre><code>ALL_ACTIVE_RECORD_MODELS.each do |model|
        model.delete_all
  end
  </code></pre>
  
  <p>I have <strong>two questions</strong> to ask regards to this:</p>
  
  <p><strong>1.</strong> How to get <strong>all active record models</strong> in Rails in my rspec code?</p>
  
  <p><strong>2.</strong> Am I using a acceptable way to truncate all tables in my test DB or not? If not, what is the alternative way?</p>