Tuesday, January 26, 2010

Re: [Rails] testing errors

2010/1/26 Vishwa Rao <lists@ruby-forum.com>:
> I have this method in user_controller_test.rb file
>  def test_auth_bob
>    #check we can login
>    post :login, :user=> { :login => "bob", :password => "test" }
>    assert_session_has :user
>    assert_equal @bob, session[:user]
>    assert_response :redirect
>    assert_redirected_to :action=>'welcome'
>  end
>
> I get this Error:
> test_auth_bob(UserControllerTest):
> NoMethodError: undefined method `assert_session_has' for
> #<UserControllerTest:0x
> 28772e0>

A quick google search shows assert_session_has as being deprecated in
2006, so presumably it is now gone. You will have to do it a
different way.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate