<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>samuelschroeder.com</title>
	<link>http://samuelschroeder.com</link>
	<description>Ruby in the front, Rails in the back.</description>
	<pubDate>Tue, 12 Jan 2010 13:58:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>Let the Awesomeness Begin</title>
		<link>http://samuelschroeder.com/2009/10/07/let-the-awesomeness-begin/</link>
		<comments>http://samuelschroeder.com/2009/10/07/let-the-awesomeness-begin/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 12:47:36 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Balckberry]]></category>

		<category><![CDATA[Android]]></category>

		<category><![CDATA[Palm]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[Miscellany]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2009/10/07/let-the-awesomeness-begin/</guid>
		<description><![CDATA[
The last six months have been busy.  Summer was crazy.  Why?  Besides working my regular consulting gigs I co-founded a new company with my good friend Justin Grammens.  We named it Recursive Awesome, LLC.
Recursive Awesome is focused on developing mobile applications for the four main smart phone platforms; iPhone, Android, Blakcberry, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.recursiveawesome.com/images/logo.png" alt="Recursive Awesome Logo" /></p>
<p>The last six months have been busy.  Summer was crazy.  Why?  Besides working my regular consulting gigs I co-founded a new company with my good friend <a href="http://localtone.blogspot.com">Justin Grammens</a>.  We named it <a href="http://recursiveawesome.com">Recursive Awesome, LLC</a>.</p>
<p>Recursive Awesome is focused on developing mobile applications for the four main smart phone platforms; iPhone, Android, Blakcberry, and Palm.  We do custom development for clients as well as build our own products.  </p>
<p>Our first product, called <a href="http://www.mobilevidhub.com">Mobile VidHub</a>, allows video producers to have a custom, branded app on each platform to distribute their content.  More details <a href="http://www.mobilevidhub.com/about.html">here</a>.</p>
<p>As for client applications you should check out <a href="http://trickiwikitrivia.com">TrickiWiki Trivia</a>.  Recursive has released <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=324592997&#038;mt=8">iPhone</a>, <a href="http://www.androlib.com/android.application.com-ck-trickiwiki-android-qnFj.aspx">Android</a>, and <a href="http://trickiwikitrivia.com/games/random_10/start">web based</a> versions of the game.  The Palm Pre and Balckberry versions are in development.  All of the TrickiWiki games are native applications with the questions powered by a Ruby on Rails web service.</p>
<p>While Justin and I are using RA to focus on mobile development we will continue to build web applications using <a href="http://www.ruby-lang.org">Ruby</a> and <a href="http://rubyonrails.org">Ruby on Rails</a>.</p>
<p>Please check out our business and let us know if you are in need of our services.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2009/10/07/let-the-awesomeness-begin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sweet UITableViewController Bug in 3.0 SDK</title>
		<link>http://samuelschroeder.com/2009/07/20/sweet-uitableviewcontroller-bug-in-30-sdk/</link>
		<comments>http://samuelschroeder.com/2009/07/20/sweet-uitableviewcontroller-bug-in-30-sdk/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 20:59:42 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2009/07/20/sweet-uitableviewcontroller-bug-in-30-sdk/</guid>
		<description><![CDATA[Just in case anyone else runs into this time suck
There is a bug in the iPhone 3.0 SDK for the UITableViewController template.  Specifically, in the didSelectRowAtIndexPath method when trying to push another view controller onto the stack.
Sweet Apple code&#8230;


[self.navigationController pushViewController: anotherViewController];


The correct code is&#8230;


[self.navigationController pushViewController: anotherViewController animated:YES];


See the difference?  Apple did complete the [...]]]></description>
			<content:encoded><![CDATA[<p>Just in case anyone else runs into this time suck</p>
<p>There is a bug in the iPhone 3.0 SDK for the UITableViewController template.  Specifically, in the didSelectRowAtIndexPath method when trying to push another view controller onto the stack.</p>
<p>Sweet Apple code&#8230;</p>
<textarea name="code" class="C++" cols="100" rows="10">

[self.navigationController pushViewController: anotherViewController];

</textarea>
<p>The correct code is&#8230;</p>
<textarea name="code" class="C++" cols="100" rows="10">

[self.navigationController pushViewController: anotherViewController animated:YES];

</textarea>
<p>See the difference?  Apple did complete the signature with the &#8220;animated&#8221; parameter.  I just spent an hour trying to find out why my UINavigationController may not respond to -pushViewController.  I guess, that&#8217;s my fault for trusting the generated code.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2009/07/20/sweet-uitableviewcontroller-bug-in-30-sdk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Attending Mt. West Ruby Conf.</title>
		<link>http://samuelschroeder.com/2009/02/26/attending-mt-west-ruby-conf/</link>
		<comments>http://samuelschroeder.com/2009/02/26/attending-mt-west-ruby-conf/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 22:22:49 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2009/02/26/attending-mt-west-ruby-conf/</guid>
		<description><![CDATA[



I&#8217;m attending the Mt. West Ruby conf next week in Salt Lake City.  If you&#8217;re attending let me know and I&#8217;ll attempt to buy a round.
I&#8217;m especially looking forward to this talk about Rhodes
]]></description>
			<content:encoded><![CDATA[<div>
<a href="http://mtnwestrubyconf.org/2009/" title="I'm attending MountainWest RubyConf 2009!"><br />
<img src="http://mtnwestrubyconf.org/2009/images/badges/attendee.png" width="250" height="200" border="0" alt="I'm attending<br />
MountainWest RubyConf 2009!"><br />
</a></div>
<p>I&#8217;m attending the Mt. West Ruby conf next week in Salt Lake City.  If you&#8217;re attending let me know and I&#8217;ll attempt to buy a round.</p>
<p>I&#8217;m especially looking forward to this talk about <a href="http://mtnwestrubyconf.org/2009/speakers#rhomobile">Rhodes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2009/02/26/attending-mt-west-ruby-conf/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GitPhone: An experimental iPhone app to stay connected with GitHub on the go</title>
		<link>http://samuelschroeder.com/2009/02/25/gitphone-an-experimental-iphone-app-to-stay-connected-with-github-on-the-go/</link>
		<comments>http://samuelschroeder.com/2009/02/25/gitphone-an-experimental-iphone-app-to-stay-connected-with-github-on-the-go/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 16:45:36 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2009/02/25/gitphone-an-experimental-iphone-app-to-stay-connected-with-github-on-the-go/</guid>
		<description><![CDATA[I started this project to test out some ideas for an iPhone app which utilizes a 3rd party API. Naturally, I chose GitHub because I&#8217;m an extreme fanboy. It&#8217;s not polished. There are no tests. It really doesn&#8217;t do anything useful and I really don&#8217;t where I want to take it. However, there is a [...]]]></description>
			<content:encoded><![CDATA[<p>I started this project to test out some ideas for an iPhone app which utilizes a 3rd party API. Naturally, I chose <a href="http://github.com">GitHub</a> because I&#8217;m an extreme fanboy. It&#8217;s not polished. There are no tests. It really doesn&#8217;t do anything useful and I really don&#8217;t where I want to take it. However, there is a good deal of infrastructure here that I feel is worth sharing, especially, since there are so few OSS iPhone apps out there in their entirety.</p>
<p><strong>Get the code here =></strong> <a href="http://github.com/sschroed/git-phone/tree/master">GitPhone on GitHub</a><br />
<strong>Screen Shots =></strong> <a href="http://wiki.github.com/sschroed/git-phone/screen-shots">GitPhone Wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2009/02/25/gitphone-an-experimental-iphone-app-to-stay-connected-with-github-on-the-go/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding a timer to a thread in Cocoa</title>
		<link>http://samuelschroeder.com/2008/10/23/adding-a-timer-to-a-thread-in-cocoa/</link>
		<comments>http://samuelschroeder.com/2008/10/23/adding-a-timer-to-a-thread-in-cocoa/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 19:05:55 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2008/10/23/adding-a-timer-to-a-thread-in-cocoa/</guid>
		<description><![CDATA[Just storing this code away for future reference.  It creates a new thread and adds a timer to it&#8217;s run loop.
This code creates a new thread and calls the secondThread method on self.

// Kick off a new Thread
[NSThread detachNewThreadSelector:@selector(secondThread) toTarget:self withObject:nil];

You&#8217;ll need to setup a new autorelease pool and start a run loop for [...]]]></description>
			<content:encoded><![CDATA[<p>Just storing this code away for future reference.  It creates a new thread and adds a timer to it&#8217;s run loop.</p>
<p>This code creates a new thread and calls the <strong>secondThread</strong> method on <strong>self</strong>.</p>
<textarea name="code" class="C++" cols="100" rows="10">
// Kick off a new Thread
[NSThread detachNewThreadSelector:@selector(secondThread) toTarget:self withObject:nil];
</textarea>
<p>You&#8217;ll need to setup a new <strong>autorelease pool</strong> and start a <strong>run loop</strong> for your new thread.  Ths code below does the following.</p>
<ul>
<li>creates a new pool</li>
<li>creates a new timer to call the <strong>secondThreadMethod</strong> method every 5 seconds</li>
<li>adds the timer to the new thread&#8217;s run loop</li>
<li>starts the new thread&#8217;s run loop</li>
</ul>
<textarea name="code" class="C++" cols="100" rows="10">
- (void) secondThread{
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
	
	// Create a time for the thread
	NSTimer *timer = [NSTimer timerWithTimeInterval:5 target:self selector:@selector(secondThreadMethod) userInfo:nil repeats:YES];
	
	// Add the timer to the run loop
    [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
    [[NSRunLoop currentRunLoop] run];
	
	[pool release];
}
</textarea>
<textarea name="code" class="C++" cols="100" rows="10">
- (void) secondThreadMethod{
	NSLog(@"fired secondThreadMethod");
}
</textarea>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2008/10/23/adding-a-timer-to-a-thread-in-cocoa/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mini-Mallows: A Multi-Part Form Wrapper for Cocoa &#038; iPhone</title>
		<link>http://samuelschroeder.com/2008/10/22/mini-mallows-a-multi-part-form-wrapper-for-cocoa-iphone/</link>
		<comments>http://samuelschroeder.com/2008/10/22/mini-mallows-a-multi-part-form-wrapper-for-cocoa-iphone/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 21:06:08 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Objective-C]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2008/10/22/mini-mallows-a-multi-part-form-wrapper-for-cocoa-iphone/</guid>
		<description><![CDATA[
All I wanted was some simple code to POST an image to a web service from my iPhone project.  No big deal, right? Apparently, not.
Based on my google search results many people we were wanting the same thing and just not finding it.  There are a couple iphone development sites giving examples and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm3.static.flickr.com/2110/2156612754_0c9b42cd55_m.jpg" alt="Mini-Mallows in Cocoa" /></p>
<p>All I wanted was some simple code to POST an image to a web service from my iPhone project.  No big deal, right? Apparently, not.</p>
<p>Based on my google search results many people we were wanting the same thing and just not finding it.  There are a couple iphone development sites giving examples and some really old open-source projects but nothing really felt right to me.  So being a good developer I hacked something together which works for me and posted it on GitHub.</p>
<p>Issuing standard GETs and POSTs with Cocoa is pretty easy, but I couldn&#8217;t find anything <em>easy</em> to make multi-part forms for POSTing.  This is where mini-mallows comes in.  Just make some Cocoa, add some mini-mallows (form fields &amp; a file), and POST.</p>
<p>Easy.</p>
<h2>Current status</h2>
<p>This project was written to satisfy my need to POST a single image and related form fields from an iPhone app to a web service. It only allows for the addition of one file per request.  I am very open to comments, patches, and ridicule.</p>
<h2>Installation</h2>
<p>Get the code from GitHub => a href=&#8221;http://github.com/sschroed/mini-mallows&#8221;>http://github.com/sschroed/mini-mallows</a></p>
<p>Copy the files MultipartForm.h and MultipartForm.m anywhere you like into your Xcode project.</p>
<h2>Usage</h2>
<p>First, add your standard #import.</p>
<textarea name="code" class="C++" cols="100" rows="10">
#import "MultipartForm.h"
</textarea>
<p>Create a NSURL object as you&#8217;ll need to send that to Mini-Mallows.</p>
<textarea name="code" class="C++" cols="100" rows="10">
NSURL *postUrl = [NSURL URLWithString:@"http://www.domain.com"];
</textarea>
<p>Now create a MultipartForm object and a few form fields and a file.  I really wanted to call the class MiniMallows but MultipartForm is easier on the eyes.</p>
<textarea name="code" class="C++" cols="100" rows="10">
MultipartForm *form = [[MultipartForm alloc] initWithURL:postUrl];
[form addFormField:@"formFieldName1" withStringData:@"This is some data"];
[form addFormField:@"formFieldName2" withStringData:@"This is more data"];
[form addFile:@"path/to/file" withFieldName:@"formFieldForFile"];
</textarea>
<p>When you are done adding fields and the file you can get a fully formed NSMutableURLRequest object from Mini-Mallows.</p>
<textarea name="code" class="C++" cols="100" rows="10">
NSMutableURLRequest *postRequest = [form mpfRequest];
</textarea>
<p>All set so POST the form.</p>
<textarea name="code" class="C++" cols="100" rows="10">
NSData *urlData;
NSURLResponse *response;
NSError *error;

urlData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&amp;response error:&amp;error];
</textarea>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2008/10/22/mini-mallows-a-multi-part-form-wrapper-for-cocoa-iphone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introducing BabyBeats</title>
		<link>http://samuelschroeder.com/2008/10/13/introducing-babybeats/</link>
		<comments>http://samuelschroeder.com/2008/10/13/introducing-babybeats/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 21:51:18 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2008/10/13/introducing-babybeats/</guid>
		<description><![CDATA[Well, I just submitted my first application to Apple.  Wish me luck on getting it accepted.
BabyBeats - Life&#8217;s Soothing Rhythm.
Making bedtime easy for babies and their parents
BabyBeats plays a steady, comforting heartbeat.  Babies will recognize the familiar sound and be comforted as it is similar to the sound they heard while safe and [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I just submitted my first application to Apple.  Wish me luck on getting it accepted.</p>
<p><strong>BabyBeats - Life&#8217;s Soothing Rhythm.</strong><br />
<em>Making bedtime easy for babies and their parents</em></p>
<p>BabyBeats plays a steady, comforting heartbeat.  Babies will recognize the familiar sound and be comforted as it is similar to the sound they heard while safe and warm in utero, mommy&#8217;s heartbeat.</p>
<p>Just push the &#8220;Start Rhythm&#8221; button and adjust the volume for a continuous calming heartbeat.  BabyBeats is specially made to work even when the phone ringer is set to mute so remember to shut off the ringer so incoming calls, emails, and text messages won&#8217;t disturb your baby. </p>
<p><a href="http://s143.photobucket.com/albums/r122/sschroed/samuelschroederdotcom/?action=view&#038;current=babybeats.jpg" target="_blank"><img src="http://i143.photobucket.com/albums/r122/sschroed/samuelschroederdotcom/babybeats.jpg" border="0" alt="BabyBeats"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2008/10/13/introducing-babybeats/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windy City Rails</title>
		<link>http://samuelschroeder.com/2008/09/04/windy-city-rails/</link>
		<comments>http://samuelschroeder.com/2008/09/04/windy-city-rails/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 12:56:16 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2008/09/04/windy-city-rails/</guid>
		<description><![CDATA[I&#8217;m attending the Windy City Rails conference on September 20th with 5 other Ruby.mn members.  The plan is to pile into one minivan, dubbed the &#8220;MinniBus&#8221;, and motor down to Chicago.  Good times expected.



]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m attending the Windy City Rails conference on September 20th with 5 other <a href="http://www.ruby.mn/">Ruby.mn</a> members.  The plan is to pile into one minivan, dubbed the &#8220;MinniBus&#8221;, and motor down to Chicago.  Good times expected.<br />
<a href="http://www.windycityrails.org"><br />
<img src="http://m.windycityrails.org/images/windycityrails_125.gif" width="125" height="125" alt="WindyCityRails - September 20, 2008 - I'm attending!" align="top"/><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2008/09/04/windy-city-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RESTful_Easy_Messages now on GitHub.</title>
		<link>http://samuelschroeder.com/2008/06/05/restful_easy_messages-now-on-github/</link>
		<comments>http://samuelschroeder.com/2008/06/05/restful_easy_messages-now-on-github/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 15:45:27 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2008/06/05/restful_easy_messages-now-on-github/</guid>
		<description><![CDATA[I just pushed the 0.7 svn tag of the RESTful_Easy_Messages plug-in to GitHub so I can play with the cool kids.  Go see it here => http://github.com/sschroed/restful_ezm. This will be the authoritative source from here on out.
It is in need of an update for Rails 2.1 so any help is appreciated.
]]></description>
			<content:encoded><![CDATA[<p>I just pushed the 0.7 svn tag of the <a href="http://samuelschroeder.com/2007/10/16/restful_easy_messages/">RESTful_Easy_Messages plug-in</a> to GitHub so I can play with the cool kids.  Go see it here => <a href="http://github.com/sschroed/restful_ezm">http://github.com/sschroed/restful_ezm</a>. This will be the authoritative source from here on out.</p>
<p>It is in need of an update for Rails 2.1 so any help is appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2008/06/05/restful_easy_messages-now-on-github/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RSpec and Rails Partials</title>
		<link>http://samuelschroeder.com/2008/05/13/rspec-and-rails-partials/</link>
		<comments>http://samuelschroeder.com/2008/05/13/rspec-and-rails-partials/#comments</comments>
		<pubDate>Tue, 13 May 2008 19:03:17 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
		
		<category><![CDATA[RSpec]]></category>

		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://samuelschroeder.com/2008/05/13/rspec-and-rails-partials/</guid>
		<description><![CDATA[For some reason Test:Unit and I are not friends.  I&#8217;m not really sure why, but I always drop to voice mail when I call.  So, I moved and started working on project with Andy and Heather Tinkham (two local MPLS software testers) to learn RSpec.  More to come on that at a [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason Test:Unit and I are not friends.  I&#8217;m not really sure why, but I always drop to voice mail when I call.  So, I moved and started working on project with <a href="http://twitter.com/andytinkham">Andy</a> and <a href="http://www.linkedin.com/pub/0/4a8/7b0">Heather</a> Tinkham (two local MPLS software testers) to learn RSpec.  More to come on that at a later date.  Stealth mode now.  Move along, nothing to see&#8230;</p>
<p>It&#8217;s been fun and I&#8217;m enjoying BDD.  Once I get the basics down I&#8217;ll get into RSpec stories too. Anyway, back to the point.</p>
<p>On my current project we are working on a new version of the most important feature of the site.  Without it, everything else is crap.  It&#8217;s the main driver for adding content and it needs to be rock solid, no, <a href="http://van.physics.uiuc.edu/qa/listing.php?id=613">diamond solid</a>.  And being a newly minted RSpec user I wanted spec it all out, cover every angle, even add view specs.  Here is where my noobness shines.</p>
<p>The new feature is in it&#8217;s own partial which is nested in another partial nested within a page.  Pretty standard stuff.  With the process for writing Rails views and partials in mind I set about trying to write nested view specs.  That doesn&#8217;t work. AT ALL.  The RSpec <a href="http://rspec.rubyforge.org/documentation/rails/writing/views.html">view docs</a> talk about the expect_render and stub_render methods but I still couldn&#8217;t figure it out. </p>
<p>So I called google and still nothing really popped out until I saw an archived email chain where someone said just spec the partials.  WTF? OK?  So I added a new file to my specs:  spec/views/my_view_folder/partial_name.html.erb_spec.rb, added the following, and waited for autotest to run.  And you know what?  That bastard ran.  Maybe I&#8217;m just dense, or missed a paragraph somewhere, but an example of the right way to do partial specs would have been sweet.  I hope this helps other unsuspecting noob.</p>
<textarea name="code" class="ruby" cols="100" rows="10">
require File.dirname(__FILE__) + '/../../spec_helper'

describe "/my_view_folder/_partial_name.html.erb" do

  include ControllerHelper

  before(:each) do
    # Stub
    @variable = mock_model(ModelName)
  end 
  
  it "should display the div" do
    render :partial => "/my_view_folder/partial", :locals => { :variable => @variable }
    response.should have_tag('div#div-id')
  end
end
</textarea>
<p><strong>Note:</strong> Just in case this genero code is confusing replace &#8220;my_view_folder&#8221; with the actual name of the view directory and &#8220;partial&#8221; with the actual partial name.  And change ControllerHelper to be the name of the actual helper.  You get that when you run the RSpec scaffold generator.  I did that because I&#8217;m lazy and didn&#8217;t want to make all the spec files by hand.</p>
<p><strong>UPDATE:</strong> I&#8217;ve updated the source to show how to do locals.</p>
<p><strong>Resources I found useful</strong></p>
<ul>
<li><a href="http://blog.davidchelimsky.net/articles/2006/11/06/view-spec-tutorial">http://blog.davidchelimsky.net/articles/2006/11/06/view-spec-tutorial</a></li>
<li><a href="http://rubypond.com/articles/2008/03/31/using-rspec-have_tag/">http://rubypond.com/articles/2008/03/31/using-rspec-have_tag/</a></li>
<li><a href="http://errtheblog.com/posts/66-view-testing-20">http://errtheblog.com/posts/66-view-testing-20</a></li>
<li><a href="http://rspec.rubyforge.org/documentation/rails/writing/views.html">http://rspec.rubyforge.org/documentation/rails/writing/views.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://samuelschroeder.com/2008/05/13/rspec-and-rails-partials/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

