<?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: The login! test helper for Restful Authentication and&#160;Machinist</title>
	<atom:link href="http://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/feed/" rel="self" type="application/rss+xml" />
	<link>http://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/</link>
	<description></description>
	<lastBuildDate>Wed, 10 Mar 2010 01:15:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kiran</title>
		<link>http://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/comment-page-1/#comment-69019</link>
		<dc:creator>Kiran</dc:creator>
		<pubDate>Wed, 23 Sep 2009 20:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-69019</guid>
		<description>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<br />
  login<br />
  email<br />
  password &#8216;monkey&#8217;<br />
  password_confirmation &#8220;#{password}&#8221;<br />
  activation_code nil<br />
end</p>
<p>Also here is the sham definition for people that care:</p>
<p>Sham.define do<br />
  email { Faker::Internet.email }<br />
  login { Faker::Internet.user_name }<br />
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)<br />
    UserMailer.deliver_signup_notification(user) if user.active?<br />
  end</p>
<p>Hope that helps others get a passing set of tests</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/comment-page-1/#comment-68772</link>
		<dc:creator>Trevor</dc:creator>
		<pubDate>Sat, 27 Jun 2009 21:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-68772</guid>
		<description>Keith, I&#039;m not doing anything special, I don&#039;t think: http://gist.github.com/137125</description>
		<content:encoded><![CDATA[<p>Keith, I&#8217;m not doing anything special, I don&#8217;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://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/comment-page-1/#comment-68771</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Sat, 27 Jun 2009 20:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-68771</guid>
		<description>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&#8217;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://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/comment-page-1/#comment-68224</link>
		<dc:creator>zerohalo</dc:creator>
		<pubDate>Fri, 13 Feb 2009 00:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-68224</guid>
		<description>I like.</description>
		<content:encoded><![CDATA[<p>I like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mischa</title>
		<link>http://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/comment-page-1/#comment-68221</link>
		<dc:creator>Mischa</dc:creator>
		<pubDate>Thu, 12 Feb 2009 20:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-68221</guid>
		<description>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&#8217;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://almosteffortless.com/2009/02/12/the-login-test-helper-for-restful-authentication-and-machinist/comment-page-1/#comment-68217</link>
		<dc:creator>ZDZolton</dc:creator>
		<pubDate>Thu, 12 Feb 2009 16:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1171#comment-68217</guid>
		<description>YTMND!!</description>
		<content:encoded><![CDATA[<p>YTMND!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
