<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Testing with Basic HTTP Authentication in Rails 2.0</title>
	<atom:link href="http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/</link>
	<description>class AllYourCode &#60; Us</description>
	<lastBuildDate>Mon, 28 Jun 2010 23:07:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: joost</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-699</link>
		<dc:creator>joost</dc:creator>
		<pubDate>Sun, 15 Feb 2009 08:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-699</guid>
		<description>Instead of using Base64 directly, it&#039;s better to use:&lt;br&gt;&lt;br&gt;ActionController::HttpAuthentication::Basic.encode_credentials(&#039;username&#039;, &#039;password&#039;)</description>
		<content:encoded><![CDATA[<p>Instead of using Base64 directly, it&#39;s better to use:</p>
<p>ActionController::HttpAuthentication::Basic.encode_credentials(&#39;username&#39;, &#39;password&#39;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jantzen Owens</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-657</link>
		<dc:creator>Jantzen Owens</dc:creator>
		<pubDate>Thu, 23 Oct 2008 05:47:55 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-657</guid>
		<description>This was just what I needed!&lt;br&gt;&lt;br&gt;Like unit testing you can do&lt;br&gt;&lt;br&gt;def setup&lt;br&gt;http_auth&lt;br&gt;end&lt;br&gt;&lt;br&gt;so all your test methods are authenticated.</description>
		<content:encoded><![CDATA[<p>This was just what I needed!</p>
<p>Like unit testing you can do</p>
<p>def setup<br />http_auth<br />end</p>
<p>so all your test methods are authenticated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Cannon</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-500</link>
		<dc:creator>Ryan Cannon</dc:creator>
		<pubDate>Mon, 21 Jul 2008 06:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-500</guid>
		<description>A few months late, I found this via the Google. A couple notes:

In case you&#039;re unfamiliar with testing Rails, this goes in test/test_helper.rb

The function above doesn&#039;t actually let you test HTTP Authentication. To do that you&#039;ll need to do something like:

    def authenticate_with_http(username, password)
      @request.env[”HTTP_AUTHORIZATION”] =
      &quot;Basic #{Base64.encode64(&quot;#{username}:#{password}&quot;)}&quot;
    end</description>
		<content:encoded><![CDATA[<p>A few months late, I found this via the Google. A couple notes:</p>
<p>In case you&#8217;re unfamiliar with testing Rails, this goes in test/test_helper.rb</p>
<p>The function above doesn&#8217;t actually let you test HTTP Authentication. To do that you&#8217;ll need to do something like:</p>
<p>    def authenticate_with_http(username, password)<br />
      @request.env[”HTTP_AUTHORIZATION”] =<br />
      &#8220;Basic #{Base64.encode64(&#8220;#{username}:#{password}&#8221;)}&#8221;<br />
    end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-244</link>
		<dc:creator>robert</dc:creator>
		<pubDate>Tue, 06 May 2008 16:46:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-244</guid>
		<description>thanks for this. helped in our functional tests of our REST services using http basic auth.</description>
		<content:encoded><![CDATA[<p>thanks for this. helped in our functional tests of our REST services using http basic auth.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lane</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-52</link>
		<dc:creator>Lane</dc:creator>
		<pubDate>Fri, 29 Feb 2008 00:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-52</guid>
		<description>Ahh, yes!  I&#039;ve been looking for this too.  Thanks!</description>
		<content:encoded><![CDATA[<p>Ahh, yes!  I&#8217;ve been looking for this too.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-39</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Wed, 20 Feb 2008 02:20:17 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-39</guid>
		<description>It&#039;s always kind of cool when random people read your blog and you can help them :)</description>
		<content:encoded><![CDATA[<p>It&#8217;s always kind of cool when random people read your blog and you can help them <img src='http://jonathanng.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-38</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Wed, 20 Feb 2008 01:48:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-38</guid>
		<description>Thanks! Finally made my tests work..

Regards</description>
		<content:encoded><![CDATA[<p>Thanks! Finally made my tests work..</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-11</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Thu, 17 Jan 2008 11:06:52 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-11</guid>
		<description>Ce n&#039;est pas un problème! (That&#039;s my year of Français I took coming out)

I definitely spent too much time trying to figure this out...it&#039;s the simple things that are always a pain!</description>
		<content:encoded><![CDATA[<p>Ce n&#8217;est pas un problème! (That&#8217;s my year of Français I took coming out)</p>
<p>I definitely spent too much time trying to figure this out&#8230;it&#8217;s the simple things that are always a pain!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugues Lamy</title>
		<link>http://jonathanng.com/ruby-on-rails/testing-with-basic-http-authentication-in-rails-20/comment-page-1/#comment-10</link>
		<dc:creator>Hugues Lamy</dc:creator>
		<pubDate>Fri, 11 Jan 2008 20:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanng.com/2008/01/11/testing-with-basic-http-authentication-in-rails-20/#comment-10</guid>
		<description>Thanks for the tip. You just saved me couple of hours of fighting with the tests.

Take Care.

Hugues</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. You just saved me couple of hours of fighting with the tests.</p>
<p>Take Care.</p>
<p>Hugues</p>
]]></content:encoded>
	</item>
</channel>
</rss>
