<?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"
	>
<channel>
	<title>Comments for Ruby Tutorials</title>
	<atom:link href="http://www.rubytutorials.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rubytutorials.net</link>
	<description>Doctor's orders</description>
	<pubDate>Mon, 15 Mar 2010 19:51:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>Comment on Small Rspec revelations, ActionMailer by admin</title>
		<link>http://www.rubytutorials.net/2008/02/26/small-rspec-revelations-actionmailer/#comment-1711</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 22 Jan 2010 07:37:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=11#comment-1711</guid>
		<description>You have to spec a notifier (instance of ActionMailer) seperately. And it took me a long time to figure out. A spec would look something like this:

describe Notifications, :type =&gt; :helper do #setting type is necessary
  before(:each) do
    ActionMailer::Base.delivery_method = :test
    ActionMailer::Base.perform_deliveries = true
    ActionMailer::Base.deliveries = []
  end

  it "should sent a nice email with the analyses to the user" do
    analysis_observer = AnalysisObserver.instance
    analysis_observer.stub!(:after_create)
    mail = Notifications.deliver_analyses_to_user "somegmail@gmail.com", Factory(:temporary_user, :analyses =&gt; [Factory(:analysis)])
    ActionMailer::Base.deliveries.size.should == 1
    mail.body.should have_tag("img", 3)
    mail.body.should have_tag("table")
  end

Hope that helps!</description>
		<content:encoded><![CDATA[<p>You have to spec a notifier (instance of ActionMailer) seperately. And it took me a long time to figure out. A spec would look something like this:</p>
<p>describe Notifications, :type => :helper do #setting type is necessary<br />
  before(:each) do<br />
    ActionMailer::Base.delivery_method = :test<br />
    ActionMailer::Base.perform_deliveries = true<br />
    ActionMailer::Base.deliveries = []<br />
  end</p>
<p>  it &#8220;should sent a nice email with the analyses to the user&#8221; do<br />
    analysis_observer = AnalysisObserver.instance<br />
    analysis_observer.stub!(:after_create)<br />
    mail = Notifications.deliver_analyses_to_user &#8220;somegmail@gmail.com&#8221;, Factory(:temporary_user, :analyses => [Factory(:analysis)])<br />
    ActionMailer::Base.deliveries.size.should == 1<br />
    mail.body.should have_tag(&#8221;img&#8221;, 3)<br />
    mail.body.should have_tag(&#8221;table&#8221;)<br />
  end</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Small Rspec revelations, ActionMailer by Amit</title>
		<link>http://www.rubytutorials.net/2008/02/26/small-rspec-revelations-actionmailer/#comment-1710</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Fri, 22 Jan 2010 06:57:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=11#comment-1710</guid>
		<description>Hi i am testing email through rspec.I followed your suggestions but some problem occured.
This is the whole scenario:
What i want to do is when my user is created it should send mail to for activation.
This is the code under user_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
#require 'rasta/fixture/rasta_fixture'
#require 'fastercsv'

def valid_user_attributes
  {
    :email =&#62; "testing@joshsoftware.com",
    :login =&#62; "test",
    :password =&#62; "test123",
    :password_confirmation =&#62; "test123",
    :role_id =&#62; 1
  }
end

describe User do
  before(:each) do
    @user = User.create
    ActionMailer::Base.delivery_method = :test  
    ActionMailer::Base.perform_deliveries = true  
    ActionMailer::Base.deliveries = []  
  end

  fixtures :users

  context "User" do
    it "should be create if all the credentials are provided" do
      @user.attributes = valid_user_attributes
       mail = Notifier.signup_notification("user_1")
       ActionMailer::Base.deliveries.size.should == 1
       mail.body.should =~ /Please signup/
       @user.should be_valid
       @user.save
    end

Now here Notifier ia another model which contains signup_ notification method.
Is it the case that i would need to test that in notifier spec or is it possible to get notifier model in user like require 'notifier.rb'
Please suggest</description>
		<content:encoded><![CDATA[<p>Hi i am testing email through rspec.I followed your suggestions but some problem occured.<br />
This is the whole scenario:<br />
What i want to do is when my user is created it should send mail to for activation.<br />
This is the code under user_spec.rb<br />
require File.expand_path(File.dirname(__FILE__) + &#8216;/../spec_helper&#8217;)<br />
#require &#8216;rasta/fixture/rasta_fixture&#8217;<br />
#require &#8216;fastercsv&#8217;</p>
<p>def valid_user_attributes<br />
  {<br />
    :email =&gt; &#8220;testing@joshsoftware.com&#8221;,<br />
    :login =&gt; &#8220;test&#8221;,<br />
    :password =&gt; &#8220;test123&#8243;,<br />
    :password_confirmation =&gt; &#8220;test123&#8243;,<br />
    :role_id =&gt; 1<br />
  }<br />
end</p>
<p>describe User do<br />
  before(:each) do<br />
    @user = User.create<br />
    ActionMailer::Base.delivery_method = :test<br />
    ActionMailer::Base.perform_deliveries = true<br />
    ActionMailer::Base.deliveries = []<br />
  end</p>
<p>  fixtures :users</p>
<p>  context &#8220;User&#8221; do<br />
    it &#8220;should be create if all the credentials are provided&#8221; do<br />
      @user.attributes = valid_user_attributes<br />
       mail = Notifier.signup_notification(&#8221;user_1&#8243;)<br />
       ActionMailer::Base.deliveries.size.should == 1<br />
       mail.body.should =~ /Please signup/<br />
       @user.should be_valid<br />
       @user.save<br />
    end</p>
<p>Now here Notifier ia another model which contains signup_ notification method.<br />
Is it the case that i would need to test that in notifier spec or is it possible to get notifier model in user like require &#8216;notifier.rb&#8217;<br />
Please suggest</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Small Rspec revelations, ActionMailer by ahabman</title>
		<link>http://www.rubytutorials.net/2008/02/26/small-rspec-revelations-actionmailer/#comment-1361</link>
		<dc:creator>ahabman</dc:creator>
		<pubDate>Tue, 24 Nov 2009 17:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=11#comment-1361</guid>
		<description>Perfect.  That's exactly what I needed.</description>
		<content:encoded><![CDATA[<p>Perfect.  That&#8217;s exactly what I needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Small Rspec revelations, ActionMailer by Simple Email Form with ActionMailer</title>
		<link>http://www.rubytutorials.net/2008/02/26/small-rspec-revelations-actionmailer/#comment-1293</link>
		<dc:creator>Simple Email Form with ActionMailer</dc:creator>
		<pubDate>Wed, 18 Nov 2009 06:33:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=11#comment-1293</guid>
		<description>[...] In test-driven style (thanks to rubytutorials.net), here&#8217;s a spec for we&#8217;ll make work (at least the sending mail part of it). Note that [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] In test-driven style (thanks to rubytutorials.net), here&#8217;s a spec for we&#8217;ll make work (at least the sending mail part of it). Note that [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Small Rspec revelations, ActionMailer by Marcelo Silveira</title>
		<link>http://www.rubytutorials.net/2008/02/26/small-rspec-revelations-actionmailer/#comment-1206</link>
		<dc:creator>Marcelo Silveira</dc:creator>
		<pubDate>Thu, 29 Oct 2009 19:51:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=11#comment-1206</guid>
		<description>Helped a lot. Thanks!</description>
		<content:encoded><![CDATA[<p>Helped a lot. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Glassfish v3 with Merb and Warbler by LOTD #15: Deploying Merb application on GlassFish v3 using Warbler &#171; Miles to go &#8230;</title>
		<link>http://www.rubytutorials.net/2008/12/03/glassfish-v3-with-merb-and-warbler/#comment-1008</link>
		<dc:creator>LOTD #15: Deploying Merb application on GlassFish v3 using Warbler &#171; Miles to go &#8230;</dc:creator>
		<pubDate>Fri, 21 Aug 2009 23:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=20#comment-1008</guid>
		<description>[...] GlassFish v3 with Merb and Warbler explains how to use Warbler to deploy a Merb application on GlassFish v3. Here is a quote&#160;from the blog: [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] GlassFish v3 with Merb and Warbler explains how to use Warbler to deploy a Merb application on GlassFish v3. Here is a quote&nbsp;from the blog: [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The usage of self in Ruby by John conrad</title>
		<link>http://www.rubytutorials.net/2008/01/01/the-usage-of-self-in-ruby/#comment-907</link>
		<dc:creator>John conrad</dc:creator>
		<pubDate>Sun, 12 Jul 2009 09:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=9#comment-907</guid>
		<description>one more nice topic in your blog and nice comments too keep it up, If you advise some more related links to topic. I'm very interested in CMS and all its related subjects.</description>
		<content:encoded><![CDATA[<p>one more nice topic in your blog and nice comments too keep it up, If you advise some more related links to topic. I&#8217;m very interested in CMS and all its related subjects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deploying a Merb app on Glassfish with Capistrano by Anh</title>
		<link>http://www.rubytutorials.net/2008/12/04/deploying-a-merb-app-on-glassfish-with-capistrano/#comment-863</link>
		<dc:creator>Anh</dc:creator>
		<pubDate>Tue, 23 Jun 2009 06:28:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=21#comment-863</guid>
		<description>Thank you !!!</description>
		<content:encoded><![CDATA[<p>Thank you !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on attachment_fu dances with Capistrano by admin</title>
		<link>http://www.rubytutorials.net/2007/11/13/attachment_fu-dances-with-capistrano/#comment-823</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 04 Jun 2009 11:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=5#comment-823</guid>
		<description>Just run that command on the commandline and you're done!</description>
		<content:encoded><![CDATA[<p>Just run that command on the commandline and you&#8217;re done!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on attachment_fu dances with Capistrano by Jonas</title>
		<link>http://www.rubytutorials.net/2007/11/13/attachment_fu-dances-with-capistrano/#comment-821</link>
		<dc:creator>Jonas</dc:creator>
		<pubDate>Wed, 03 Jun 2009 12:44:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubytutorials.net/?p=5#comment-821</guid>
		<description>Forgive a newbee, but where/how do I set:
svn propset svn:ignore "*" public/system/</description>
		<content:encoded><![CDATA[<p>Forgive a newbee, but where/how do I set:<br />
svn propset svn:ignore &#8220;*&#8221; public/system/</p>
]]></content:encoded>
	</item>
</channel>
</rss>
