title: Testing helper methods w/ RSpec
body: <p>How should I go about testing this helper with RSpec?</p>
  
  <pre><code>module ApplicationHelper
    def build_rpx_url(provider)
      signin_url(provider) &lt;&lt; "?token_url=" &lt;&lt; token_url &lt;&lt; provider_params(provider)
    end
  
  
    private
  
    def signin_url(provider)
      case provider.downcase
      when 'facebook'; 'https://login.xyz.net/facebook/connect_start'
      when 'google';   'https://login.xyz.net/openid/start'
      when 'twitter';  'https://login.xyz.net/twitter/start'
      when 'linkedin'; 'https://login.xyz.net/linkedin/start'
      when 'yahoo';    'https://login.xyz.net/openid/start'
      end
    end
  
    def provider_params(provider)
      params = case provider.downcase
      when 'facebook'; ["ext_perm=publish_stream,email,offline_access"]
      when 'google';   ["openid_identifier=https://www.google.com/accounts/o8/id"]
      when 'twitter';  []
      when 'linkedin'; []
      when 'yahoo';    ["openid_identifier=http://me.yahoo.com/"]
      end
  
      params.empty? ? '' : "&amp;" &lt;&lt; params.join('&amp;')
    end
  
    def token_url
      "#{new_user_session_url}?authenticity_token=#{Rack::Utils.escape(form_authenticity_token)}"
    end
  end
  </code></pre>