the reason why the loop doesn't work is because the first #post logs you in. you might want to use the following if you want the loop back.

    back_urls.each do |back_url|
      post :login, :username => 'jsmith', :password => 'jsmith', :back_url => back_url
      assert_redirected_to '/my/page'

      # User.current = nil has no effect
      @request.session.delete(:user_id)
    end