<?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>Dynamic and Concise &#187; CruiseControl.rb</title>
	<atom:link href="http://yiwenandsoftware.wordpress.com/tag/cruisecontrolrb/feed/" rel="self" type="application/rss+xml" />
	<link>http://yiwenandsoftware.wordpress.com</link>
	<description>Everything about my experience with Software Development</description>
	<lastBuildDate>Sat, 14 Mar 2009 22:05:25 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='yiwenandsoftware.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/fa9ad49ca1c5d02890788e46a95fe979?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Dynamic and Concise &#187; CruiseControl.rb</title>
		<link>http://yiwenandsoftware.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://yiwenandsoftware.wordpress.com/osd.xml" title="Dynamic and Concise" />
		<item>
		<title>Intergrate RSpec Story Runner into CruiseControl.rb build process with HTML report</title>
		<link>http://yiwenandsoftware.wordpress.com/2008/06/25/intergrate-rspec-story-runner-in-cruisecontrolrb-build-with-html-report/</link>
		<comments>http://yiwenandsoftware.wordpress.com/2008/06/25/intergrate-rspec-story-runner-in-cruisecontrolrb-build-with-html-report/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 14:01:51 +0000</pubDate>
		<dc:creator>Yi Wen</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[CruiseControl.rb]]></category>
		<category><![CDATA[RSpec Story]]></category>

		<guid isPermaLink="false">http://yiwenandsoftware.wordpress.com/?p=40</guid>
		<description><![CDATA[Although still a work in progress, RSpec story runner is gaining popularity rapidly. I use it because I use Webrat for acceptance tests and Webrat integrates with the story runner seamlessly.
Then next thing I need is to create a task to integrate stories into CC.rb build process. And here it is:

desc &#34;Run all stories&#34;
task :all_stories [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yiwenandsoftware.wordpress.com&blog=2109631&post=40&subd=yiwenandsoftware&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Although still a work in progress, <a href="http://rspec.info/">RSpec story runner</a> is gaining popularity rapidly. I use it because I use <a href="http://github.com/brynary/webrat/tree/master">Webrat</a> for acceptance tests and Webrat integrates with the story runner seamlessly.</p>
<p>Then next thing I need is to create a task to integrate stories into CC.rb build process. And here it is:</p>
<pre class="brush: ruby;">
desc &quot;Run all stories&quot;
task :all_stories do
    if out = ENV['CC_BUILD_ARTIFACTS']
        spec_out = &quot;#{out}/Stories&quot;
        mkdir_p spec_out unless File.directory? spec_out
        report_file_name = &quot;#{spec_out}/index.html&quot;
    else
        report_file_name = 'stories.html'
    end
    if ! spec_out.blank?
        sh &quot;cp -r #{RAILS_ROOT}/vendor/plugins/rspec/story_server/prototype/javascripts/ #{spec_out}&quot;
        sh &quot;cp -r #{RAILS_ROOT}/vendor/plugins/rspec/story_server/prototype/stylesheets/ #{spec_out}&quot;
    end
    sh &quot;ruby #{RAILS_ROOT}/stories/all.rb -f html &gt; #{report_file_name}&quot;
end
</pre>
<p>Yes, ruby a_story.rb -f html will generate an html report instead of a plain text. That&#8217;s neat. But I also need to copy javascripts and stylesheets directories to <i>#{spec_out}</i> directory because the generated html report uses css and js files in these two directories. </p>
<p>Once you run this task as part of cruise task, you should see a Stories link under Custom Build Artifacts section. And once you click on it, you should see a page much like <i>#{RAILS_ROOT}/vendor/plugins/rspec/story_server/prototype/stories.html</i>.</p>
<p>The HTML report looks nice. But imagining when we have 100 stories all cozily live in this same single HTML file. It will take forever to load the page and it will be very difficult to find any useful information within it. My proposal is we actually generate a real index which contains just story names, and a color to indicate if they failed or not. Of course each story name is clickable which leads to another page for the detailed story report.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yiwenandsoftware.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yiwenandsoftware.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yiwenandsoftware.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yiwenandsoftware.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yiwenandsoftware.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yiwenandsoftware.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yiwenandsoftware.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yiwenandsoftware.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yiwenandsoftware.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yiwenandsoftware.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yiwenandsoftware.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yiwenandsoftware.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yiwenandsoftware.wordpress.com&blog=2109631&post=40&subd=yiwenandsoftware&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://yiwenandsoftware.wordpress.com/2008/06/25/intergrate-rspec-story-runner-in-cruisecontrolrb-build-with-html-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f711c24e96cbc441b0c94141f22f2d23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hayafirst</media:title>
		</media:content>
	</item>
	</channel>
</rss>