title: Testing Rails Metal/Rack with RSpec?
body: <p>Say I have a Metal class named Preview. How do I test it with RSpec?</p>
  
  <p>When I try:</p>
  
  <pre><code>require 'spec_helper'
  
  describe Preview do
  
    it "should return the posted content" do
      post "/preview", :content =&gt; "*title*"
      response.body.should == "*title*"
    end
  
  end
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>undefined method `post' for #&lt;ActiveSupport::TestCase::Subclass_1:0x1058b3098&gt;
  </code></pre>
  
  <p>It seems that RSpec doesn't load up the <code>:post</code> method if the test isn't explicitly for a Controller. I've tried specifying <code>:type =&gt; :controller</code> to no avail.</p>