<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	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>Shannon McPherson's Web Log &#187; rspec</title>
	<atom:link href="http://mcphersonz.wordpress.com/category/rspec/feed/" rel="self" type="application/rss+xml" />
	<link>http://mcphersonz.wordpress.com</link>
	<description>random crap, mostly about programming or opperating systems.</description>
	<lastBuildDate>Thu, 12 Nov 2009 13:36:59 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mcphersonz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/9aa4358306dc01fdf45c7063218041fb?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Shannon McPherson's Web Log &#187; rspec</title>
		<link>http://mcphersonz.wordpress.com</link>
	</image>
			<item>
		<title>The RSpec Book by David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesøy, Bryan Helmkamp, Dan North</title>
		<link>http://mcphersonz.wordpress.com/2009/05/13/the-rspec-book-by-david-chelimsky-dave-astels-zach-dennis-aslak-helles%c3%b8y-bryan-helmkamp-dan-north/</link>
		<comments>http://mcphersonz.wordpress.com/2009/05/13/the-rspec-book-by-david-chelimsky-dave-astels-zach-dennis-aslak-helles%c3%b8y-bryan-helmkamp-dan-north/#comments</comments>
		<pubDate>Wed, 13 May 2009 08:39:46 +0000</pubDate>
		<dc:creator>mcphersonz</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://mcphersonz.wordpress.com/?p=80</guid>
		<description><![CDATA[I felt compelled to post this because this book is just great &#38; I wanted to share it with anyone who is interested. If you are just getting into behavior driven development (BDD), RSpec or cucumber then I have a book to recommend to you! Having heard nothing but good things, I recently purchased &#8220;The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcphersonz.wordpress.com&blog=1079187&post=80&subd=mcphersonz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I felt compelled to post this because this book is just great &amp; I wanted to share it with anyone who is interested. If you are just getting into behavior driven development (BDD), RSpec or cucumber then I have a book to recommend to you! Having heard nothing but good things, I recently purchased &#8220;<a href="http://www.pragprog.com/titles/achbd/the-rspec-book" target="_blank">The RSpec Book</a>&#8221; by David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesøy, Bryan Helmkamp, Dan North from Pragmatic Programmers.</p>
<p>It&#8217;s a easy read that is packed with great tips on how to approach BDD &#8211; as well as detailed info on rspec&#8217;s features, and tons of other very useful stuff.</p>
<p>The book is in beta right now (not finished) but you can purchase &amp; get the PDF right now. As updates are made you can re-download the PDF. Once the book is actually finished as paperback will be sent to me. I can&#8217;t wait!</p>
<p>Worth mentioning is that I  am just a fan &#8212; not affiliated with anyone who makes money from this, nor do I make any money for posting this or my website in general. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcphersonz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcphersonz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcphersonz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcphersonz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcphersonz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcphersonz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcphersonz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcphersonz.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcphersonz.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcphersonz.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcphersonz.wordpress.com&blog=1079187&post=80&subd=mcphersonz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcphersonz.wordpress.com/2009/05/13/the-rspec-book-by-david-chelimsky-dave-astels-zach-dennis-aslak-helles%c3%b8y-bryan-helmkamp-dan-north/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021b171a2eca6472ee63699c3abeafbb?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcphersonz</media:title>
		</media:content>
	</item>
		<item>
		<title>autotest+mumbles for Growl like notifications</title>
		<link>http://mcphersonz.wordpress.com/2008/08/27/autotestmumbles-for-growl-like-notifications/</link>
		<comments>http://mcphersonz.wordpress.com/2008/08/27/autotestmumbles-for-growl-like-notifications/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 03:01:01 +0000</pubDate>
		<dc:creator>mcphersonz</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://mcphersonz.wordpress.com/?p=45</guid>
		<description><![CDATA[I was working with a colleague today who was kind enough to introduce me to autotest for continuous test integration. Change a file in your app &#38; tests are automatically run for you&#8230; Nice.
One thing that really stood out aesthetically was how status messages were passed to Growl (in OSX) for eye-pleasing popup notifications outside [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcphersonz.wordpress.com&blog=1079187&post=45&subd=mcphersonz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was working with a colleague today who was kind enough to introduce me to autotest for continuous test integration. Change a file in your app &amp; tests are automatically run for you&#8230; Nice.</p>
<div id="attachment_52" class="wp-caption alignright" style="width: 310px"><a href="http://mcphersonz.files.wordpress.com/2008/08/screenshot.png"><img class="size-medium wp-image-52" src="http://mcphersonz.files.wordpress.com/2008/08/screenshot.png?w=300&#038;h=225" alt="my mumble alert" width="300" height="225" /></a><p class="wp-caption-text">screenshot of my mumble alert (top-right)</p></div>
<p>One thing that really stood out aesthetically was how status messages were passed to Growl (in OSX) for eye-pleasing popup notifications outside of a terminal window.</p>
<p>Being a <a href="http://www.ubuntu.com/getubuntu/download" target="_blank">ubuntu</a> user, I started looking for a similar solution for linux. It turns out there is a great utility for linux that resembles Growl &#8212; it&#8217;s called <a href="http://www.mumbles-project.org/" target="_blank">Mumbles</a>. The challenge was getting Mumbles to work with autotest.</p>
<p>After searching google, I found <a href="http://caffeinatedcode.wordpress.com/2008/02/22/mumble-your-tests/" target="_blank">one post that got me started</a>. This is a good post, but I had to fill in a few blanks to get everything to work.</p>
<p>Here&#8217;s what I did:</p>
<ol>
<li>Install ZenTest:</li>
</ol>
<ul>
<blockquote>
<li>sudo gem install ZenTest</li>
</blockquote>
</ul>
<ol>
<li>Install Mumbles
<ul>
<li>grab the latest .deb file or source from the <a href="http://www.mumbles-project.org/" target="_blank">mumbles-project</a> page:</li>
<blockquote>
<li>wget <a href="https://sourceforge.net/project/showfiles.php?group_id=193587&amp;package_id=227998" rel="nofollow">https://sourceforge.net/project/showfiles.php?group_id=193587&amp;package_id=227998</a></li>
</blockquote>
<li>test out mumbles by running:</li>
<blockquote>
<li>mumbles &amp;</li>
<li>mumbles-send &#8216;a title&#8217; &#8216;it works!!&#8217;</li>
</blockquote>
<li>assuming mumbles has been installed correctly, you should see a little notification pop up. I recommend that at this point you add mumbles to your system session so it will start when you login to ubuntu.</li>
<blockquote>
<li>gnome-session-properties</li>
<li>add -&gt; &#8220;mumbles&#8221; for name &amp; command -&gt; ok</li>
</blockquote>
</ul>
</li>
<li>Install ruby-dbus. I could not find a gem, so install manually:
<ul>
<li>grab the latest from <a href="https://trac.luon.net/ruby-dbus/" rel="nofollow">https://trac.luon.net/ruby-dbus/</a></li>
<blockquote>
<li>wget <a href="https://trac.luon.net/data/ruby-dbus/releases/ruby-dbus-0.2.1.tar.gz" rel="nofollow">https://trac.luon.net/data/ruby-dbus/releases/ruby-dbus-0.2.1.tar.gz</a></li>
</blockquote>
<li>extract the archive to a local directory</li>
<blockquote>
<li>tar -xvf ./ruby-dbus-0.2.1.tar.gz</li>
</blockquote>
<li>look over the README file &#8212; it provides simple instructions:</li>
<blockquote>
<li>ruby setup.rb config</li>
<li>ruby setup.rb setup</li>
<li>sudo ruby setup.rb install</li>
</blockquote>
<li>test this out by requiring dbus via irb:</li>
</ul>
<ul>
<blockquote>
<li>irb</li>
<li>irb(main):001:0&gt; require &#8216;dbus&#8217;</li>
<li>=&gt; true</li>
</blockquote>
</ul>
</li>
<li>Create a .autotest file in your application root directory (or your home directory to make the settings global) Thanks to <a href="//caffeinatedcode.wordpress.com/2008/02/22/mumble-your-tests/" target="_blank">CaffinatedCode</a> for this script &#8212; they wrote it:</li>
</ol>
<ul>
<blockquote>
<li>require &#8216;dbus&#8217;def send_message(title, message, icon)<br />
begin<br />
bus = DBus::SessionBus.instance<br />
mumbles_service = bus.service(&#8220;org.mumblesproject.Mumbles&#8221;)<br />
mumbles = mumbles_service.object(&#8220;/org/mumblesproject/Mumbles&#8221;)<br />
mumbles.introspect<br />
mumbles_iface = mumbles["org.mumblesproject.Mumbles"]<br />
sig = mumbles_iface.signals["Notify"]<br />
bus.emit(mumbles_service, mumbles, mumbles_iface, sig, title, message, icon)<br />
rescue Exception =&gt; e<br />
end<br />
end</p>
<p>Autotest.add_hook :ran_command do |at|<br />
begin<br />
output = at.results.last.slice(/(\d+) examples?, (\d+) failures?(, \d+ pending)?/)<br />
if output =~ /.*[1-9] failure.*/ then<br />
send_message(&#8220;FAIL&#8221;, &#8220;#{output}&#8221;, &#8220;fail.png&#8221;)<br />
else<br />
send_message(&#8220;PASS&#8221;, &#8220;#{output}&#8221;, &#8220;pass.png&#8221;)<br />
end<br />
rescue Exception =&gt; e<br />
end<br />
end</li>
</blockquote>
</ul>
<p>Now for the fun part. From within your app root, type:</p>
<p>autotest</p>
<p>If everything works out, you should see a few things flash by &#8211; I get a error about &#8220;Insecure world writable dir&#8221; in my home dir. I just ignored that. After that, you should see a test summary in the terminal window, followed by a mumbles popup notificaton. Kick ass!</p><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcphersonz.wordpress.com/45/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcphersonz.wordpress.com/45/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcphersonz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcphersonz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcphersonz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcphersonz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcphersonz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcphersonz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcphersonz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcphersonz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcphersonz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcphersonz.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcphersonz.wordpress.com&blog=1079187&post=45&subd=mcphersonz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcphersonz.wordpress.com/2008/08/27/autotestmumbles-for-growl-like-notifications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021b171a2eca6472ee63699c3abeafbb?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcphersonz</media:title>
		</media:content>

		<media:content url="http://mcphersonz.files.wordpress.com/2008/08/screenshot.png?w=300" medium="image">
			<media:title type="html">my mumble alert</media:title>
		</media:content>
	</item>
	</channel>
</rss>