title: DatabaseCleaner + RSpec : what is the correct configuration?
body: <p>I included <code>database_cleaner</code> gem in my rails app. Followed the example given on the git repo and included the following code in <code>spec_helper</code>  :</p>
  
  <p>Approach 1</p>
  
  <pre><code>  config.before(:suite) do
     DatabaseCleaner.strategy = :transaction
     DatabaseCleaner.clean_with(:truncation)
    end
  
    config.around(:each) do |example|
     DatabaseCleaner.cleaning do
      example.run
     end
    end
  </code></pre>
  
  <p>When i run the <code>rspec</code> i get error as <code>NoMethodError:undefined method 'cleaning' for DatabaseCleaner:Module</code>. </p>
  
  <p>So i did some research and found that i could replace the <code>config.around</code> block above with something like this :</p>
  
  <p>Approach 2</p>
  
  <pre><code>config.before(:each) do
   DatabaseCleaner.start
  end
  
  config.after(:each) do
   DatabaseCleaner.clean
  end 
  </code></pre>
  
  <p>OR</p>
  
  <p>Approach 3</p>
  
  <pre><code>config.around(:each) do |example|
    DatabaseCleaner.start
    example.run
    DatabaseCleaner.clean
  end
  </code></pre>
  
  <p>Both Approach 2 and 3 work well.<br>
  I also looked in the git repo of database_cleaner and found that <code>cleaning</code> method actually exists and with the following code :</p>
  
  <pre><code>def cleaning(&amp;block)
       start
       yield
       clean
     end
  </code></pre>
  
  <p>which is exactly same as what i did in example 3. If it does exists then why is it not accessible?  Am i missing something here. Any more setup?
  Or is Approach  2 or 3 preferable?</p>