Skip to content

Instantly share code, notes, and snippets.

@julesfern
Created October 30, 2008 11:52
Show Gist options
  • Save julesfern/20976 to your computer and use it in GitHub Desktop.
Save julesfern/20976 to your computer and use it in GitHub Desktop.
@controller = get("/sekkrit", :format=>"html", @return_to_param=>"returned")
# the test:
@controller.should redirect_to(@controller.url(:merb_auth_slice_fullfat_login, @return_to_param=>"DSFARGEG"))
# fails with:
#Expected exceptions#unauthenticated to redirect to </auth/login?return_to=DSFARGEG>, but it redirected to #</auth/login?return_to=returned>
# while the test:
@controller.should redirect_to(@controller.url(:merb_auth_slice_fullfat_login, @return_to_param=>"returned"))
# fails with:
# 'Exceptions should redirect users to the login screen with the correct return_to if return_to is set' FAILED
#Spec::Expectations::ExpectationNotMetError
#./spec/controllers/exceptions_spec.rb:28:
# and no more info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment