<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: The login! test helper for Restful Authentication and Machinist</title>
	<atom:link href="http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/</link>
	<description>A chess-playing machine of the late 18th century, promoted as an automaton but later proved a hoax.</description>
	<lastBuildDate>Mon, 30 Jan 2012 07:56:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Kiran</title>
		<link>http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/#comment-824</link>
		<dc:creator><![CDATA[Kiran]]></dc:creator>
		<pubDate>Wed, 23 Sep 2009 14:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-824</guid>
		<description><![CDATA[This was super helpful thanks for the information. I tried this with machinist and did find a couple things different from the default install of restful_auth
 

 
1. The blueprint has username and my user had login instead of username so my blueprint looks like the below
 

 
User.blueprint do
 
  login 
 
  email 
 
  password &#039;monkey&#039;
 
  password_confirmation &quot;#{password}&quot;
 
  activation_code nil
 
end
 

 
Also here is the sham definition for people that care:
 

 
Sham.define do
 
  email { Faker::Internet.email }
 
  login { Faker::Internet.user_name }
 
end
 

 
The reason for the setting the activation_code to nil is so that my tests dont generate the emails that happen as observers during signup. I had to change the default user observer that restful_auth puts in to be the following
 

 
  def after_create(user)
 
    UserMailer.deliver_signup_notification(user) if user.active?
 
  end
 

 
Hope that helps others get a passing set of tests ]]></description>
		<content:encoded><![CDATA[<p>This was super helpful thanks for the information. I tried this with machinist and did find a couple things different from the default install of restful_auth</p>
<p>1. The blueprint has username and my user had login instead of username so my blueprint looks like the below</p>
<p>User.blueprint do</p>
<p>  login </p>
<p>  email </p>
<p>  password &#039;monkey&#039;</p>
<p>  password_confirmation &quot;#{password}&quot;</p>
<p>  activation_code nil</p>
<p>end</p>
<p>Also here is the sham definition for people that care:</p>
<p>Sham.define do</p>
<p>  email { Faker::Internet.email }</p>
<p>  login { Faker::Internet.user_name }</p>
<p>end</p>
<p>The reason for the setting the activation_code to nil is so that my tests dont generate the emails that happen as observers during signup. I had to change the default user observer that restful_auth puts in to be the following</p>
<p>  def after_create(user)</p>
<p>    UserMailer.deliver_signup_notification(user) if user.active?</p>
<p>  end</p>
<p>Hope that helps others get a passing set of tests</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/#comment-823</link>
		<dc:creator><![CDATA[Trevor]]></dc:creator>
		<pubDate>Sat, 27 Jun 2009 15:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-823</guid>
		<description><![CDATA[Keith, I&#039;m not doing anything special, I don&#039;t think: &lt;a href=&quot;http://gist.github.com/137125&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/137125&lt;/a&gt; ]]></description>
		<content:encoded><![CDATA[<p>Keith, I&#039;m not doing anything special, I don&#039;t think: <a href="http://gist.github.com/137125" rel="nofollow">http://gist.github.com/137125</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/#comment-822</link>
		<dc:creator><![CDATA[Keith]]></dc:creator>
		<pubDate>Sat, 27 Jun 2009 14:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-822</guid>
		<description><![CDATA[Would you mind sharing the code inside your User.make, i&#039;m curious how you deal with Machinist and the password/salt hashes.
 

 
thanks ]]></description>
		<content:encoded><![CDATA[<p>Would you mind sharing the code inside your User.make, i&#039;m curious how you deal with Machinist and the password/salt hashes.</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zerohalo</title>
		<link>http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/#comment-821</link>
		<dc:creator><![CDATA[zerohalo]]></dc:creator>
		<pubDate>Thu, 12 Feb 2009 19:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-821</guid>
		<description><![CDATA[I like. ]]></description>
		<content:encoded><![CDATA[<p>I like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mischa</title>
		<link>http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/#comment-820</link>
		<dc:creator><![CDATA[Mischa]]></dc:creator>
		<pubDate>Thu, 12 Feb 2009 15:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-820</guid>
		<description><![CDATA[Trevor, in this case, I definitely agree that it&#039;s clarifying to have a bang here.
 

 
Maybe the rule for idiom should be like this:
 

 
Use a bang if:
 

 
An activerecord model is changing something in the db.
 

 
A activerecord model is saving or failing (e.g. create!, save!)
 

 
A method is changing session state in a test.
 

 
Hmm, what else? ]]></description>
		<content:encoded><![CDATA[<p>Trevor, in this case, I definitely agree that it&#039;s clarifying to have a bang here.</p>
<p>Maybe the rule for idiom should be like this:</p>
<p>Use a bang if:</p>
<p>An activerecord model is changing something in the db.</p>
<p>A activerecord model is saving or failing (e.g. create!, save!)</p>
<p>A method is changing session state in a test.</p>
<p>Hmm, what else?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZDZolton</title>
		<link>http://trevorturk.wordpress.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/#comment-819</link>
		<dc:creator><![CDATA[ZDZolton]]></dc:creator>
		<pubDate>Thu, 12 Feb 2009 11:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-819</guid>
		<description><![CDATA[YTMND!! ]]></description>
		<content:encoded><![CDATA[<p>YTMND!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

