[rspec-devel] [ rspec-Bugs-6547 ] should_be_redirect broken in 0.7.0

noreply at rubyforge.org noreply at rubyforge.org
Tue Nov 7 21:15:35 EST 2006


Bugs item #6547, was opened at 2006-11-07 19:25
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6547&group_id=797

Category: rails plugin
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Jay Levitt (jaylev)
Assigned to: Nobody (None)
Summary: should_be_redirect broken in 0.7.0

Initial Comment:
A bunch of specs started failing in 0.7.0.  A quick check shows that the following spec fails on .should_be_redirect, which should_be_impossible, since the .should_redirect_to (which I've just added) succeeds.  The controller code is a simple redirect_to.

context "The HarkController" do
  controller_name :hark
  integrate_views
  fixtures :hark_users
  
  specify "should allow Vlad the valid user to log in" do
    controller.should_redirect_to :action => 'index'
    post :login, :hark => {:username => "vlad", :password => "atest"}
    response.should_be_redirect
  end
  
end

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-08 02:15

Message:
fixed in trunk as of revision 1050

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-07 22:04

Message:
OK - I've got this fixed but I can't seem to get to svn on rubyforge from my current location. I will commit the fix this evening.

Thanks Jay.

David

----------------------------------------------------------------------

Comment By: Jay Levitt (jaylev)
Date: 2006-11-07 20:36

Message:
Do I write good bug reports, or what?

::crickets chirping::

The above spec (with appropriate controller code) shows the
output:

expected response to be redirect but was not
/cygdrive/c/dev/src/eclipse/hark/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:10:in
`should_be_redirect'

It also appears that response.redirect_url is nil after a
redirect...

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-07 20:22

Message:
What error are you getting?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6547&group_id=797


More information about the rspec-devel mailing list