title: RSpec-2 and Devise
body: <p>i create a customized devise registration controller and i want to test it with rspec.</p>
  
  <p>I've tried it with a very simple test :</p>
  
  <pre><code>it "creates a new parent" do
    Parent.should receive(:new)
    post :create
  end
  </code></pre>
  
  <p>but i get this exception:</p>
  
  <pre><code>Failures:
    1) Parent::RegistrationsController POST create creates a new parent
       Failure/Error: post :create, { :commit =&gt; "Daftar",
       uncaught throw `warden'
       # /home/starqle/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.3/lib/devise/hooks/timeoutable.rb:16:in `throw'
       # /home/starqle/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.3/lib/devise/hooks/timeoutable.rb:16
  </code></pre>
  
  <p>I already put this line within my test:</p>
  
  <pre><code>describe Parent::RegistrationsController do
    include Devise::TestHelpers
  end
  </code></pre>
  
  <p>I also already put this line:</p>
  
  <pre><code>request.env["devise_mapping"] = Devise.mappings[:parent]
  </code></pre>
  
  <p>anybody have ideas to solve this problem?</p>