Displaying 1 result from an estimated 1 matches for "test_get_via_redirect".
2006 Sep 03
1
Returning different values with stubs
...tatus is returned
but I also want to see that when the value of redirect? effects how
many times follow_redirect is called. Is there already a built in way
to do this or should I go hacking?
My test looks a bit like this at the moment:
# This needs redirect? to change what it returns...
# def test_get_via_redirect
# path = "/somepath"
# args = {:id => ''1''}
# @session.expects(:get).with(path,args)
# @session.stubs(:redirect?).returns() <-- returns different values
# @session.expects(:follow_redirect!). <-- expects it a certain
amount of times
# @ses...