[rspec-users] Problems with redirect_to
mauricio.linhares at gmail.com
Fri Feb 22 08:50:49 EST 2008
I have the following spec:
describe 'With successful save' do
it 'Should redirect to the new page' do
response.should redirect_to( :action => 'show', :id =>
@static_page.permalink ) ## this is the line 118
And when I try to run it it gives me the following error:
ActionController::MethodNotAllowed in 'StaticPagesController Handling
POST /pages With successful save Should redirect to the new page'
Only get, put, and delete requests are allowed.
So, the response is a redirect (the "response.should be_redirect"
passes) but when i try to be sure that it redirected to the right page
it throws this weird error to me. Any ideas about what I've done
I'm using RSpec 1.1.3 and Rails 2.0.2.
http://alinhavado.wordpress.com/ (pt-br) |
João Pessoa, PB, +55 83 8867-7208
More information about the rspec-users