title: Run a specific rake test before running a specific test in RAILS
body: <p>I am testing an app with the built-in unit testing feature provided by rails. The problem is that one test heavily depends on calculations with ids and we must test that. As active record doesn't reset auto_increment when rolling back a transaction we are having some troubles here.</p>
  
  <p>Things could be fixed if there is a way to reset all database tables and load the fixtures again as if I have run just that test.</p>
  
  <p>Firstly I try to define a setup method to reset all the necessary auto_increment values in this way:</p>
  
  <pre><code>def setup
    ActiveRecord::Base.connection.execute("ALTER TABLE 'table_name1' AUTO_INCREMENT = 1;") 
    ActiveRecord::Base.connection.execute("ALTER TABLE 'table_name2' AUTO_INCREMENT = 1;")
  end
  </code></pre>
  
  <p>but the test failed throwing this ugly error:</p>
  
  <blockquote>
    <p>ActiveRecord::StatementInvalid:
    Mysql::Error: SAVEPOINT
    active_record_1 does not exist:
    ROLLBACK TO SAVEPOINT active_record_1</p>
  </blockquote>
  
  <p>Then I try to invoke db:test:prepare and db:fixtures:load in the setup method but this failed too. Besides, it will slow up the test a lot since the setup method is run before each test in the file, isn't it?</p>
  
  <p>So how can I run those rake task just before a specific <strong>test suite or test file</strong> (don't know how to call it) and only for that one?</p>
  
  <p>Thanks! :)</p>