title: Is there a setup_class/teardown_class for Rails tests?
body: <p>I need to have a setup and teardown method for some Rails tests that is class or system wide, yet I have only found a way to define a regular setup/teardown that works on a per test level.</p>
  
  <p>For example:</p>
  
  <pre><code>class ActiveSupport::TestCase
    setup do
      puts "Setting up"
    end
  
    teardown do
      puts "tearing down"
    end
  end
  </code></pre>
  
  <p>will execute the outputs for each test case, but I would like something like:</p>
  
  <pre><code>class ActiveSupport::TestCase
    setup_fixture do
      puts "Setting up"
    end
  
    teardown_fixture do
      puts "tearing down"
    end
  end
  </code></pre>
  
  <p>which would execute the setup<code>_</code>fixture <strong>before</strong> all test methods, and then execute teardown<code>_</code>fixture <strong>after</strong> all test methods.</p>
  
  <p>Is there any such mechanism?  If not, is there an easy way to monkey patch this mechanism in?</p>