This test should pass, but it does not :-/ Why?

View: New views
3 Messages — Rating Filter:   Alert me  

This test should pass, but it does not :-/ Why?

by Roger Pack-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://gist.github.com/230814
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: This test should pass, but it does not :-/ Why?

by Roger Pack-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexander Seidl wrote:
> http://gist.github.com/230814

I should give some keywords here:
I set an expectation in the test that a redirect_to should take place if
a certain condition is made: @login_user.categories.size <= 0.
But the test fails and says: "expected redirect to {:action=>"index"},
got no redirect"
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: This test should pass, but it does not :-/ Why?

by Roger Pack-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexander Seidl wrote:
> Alexander Seidl wrote:
>> http://gist.github.com/230814
>
> I should give some keywords here:
> I set an expectation in the test that a redirect_to should take place if
> a certain condition is made: @login_user.categories.size <= 0.
> But the test fails and says: "expected redirect to {:action=>"index"},
> got no redirect"

argh,
i know whats missing: get :assign
*g*
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users