<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>something learned comments on New Plugin: xls_fixtures</title>
    <link>http://somethinglearned.com/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>something learned comments</description>
    <item>
      <title>"New Plugin: xls_fixtures": comment by trevor</title>
      <description>Josh,

thanks for the comment.  I'm aware that fixtures use ERB - in fact the README for the plugin shows using an ERB string to generate a time value.

My personal experience is that ERB looping to generate reams of data is more cumbersome than Excel cut and paste or dragging a cel boundary to autoincrement values.</description>
      <pubDate>Tue, 17 Oct 2006 14:25:56 EDT</pubDate>
      <guid>http://somethinglearned.com/articles/2006/10/17/new-plugin-xls_fixtures#comment-71</guid>
      <link>http://somethinglearned.com/articles/2006/10/17/new-plugin-xls_fixtures#comment-71</link>
    </item>
    <item>
      <title>"New Plugin: xls_fixtures": comment by josh susser</title>
      <description>Fixtures in Rails are processed using ERb, so you can use Ruby code to loop and generate reams of data programmatically. This is documented in the API docs: http://api.rubyonrails.org/classes/Fixtures.html</description>
      <pubDate>Tue, 17 Oct 2006 14:11:19 EDT</pubDate>
      <guid>http://somethinglearned.com/articles/2006/10/17/new-plugin-xls_fixtures#comment-70</guid>
      <link>http://somethinglearned.com/articles/2006/10/17/new-plugin-xls_fixtures#comment-70</link>
    </item>
    <item>
      <title>"New Plugin: xls_fixtures" by trevor</title>
      <description>&lt;p&gt;Here&amp;#8217;s a little something I whipped up that&amp;#8217;s proved useful.&lt;/p&gt;


	&lt;p&gt;Yaml is a pretty good format for storing fixture data but it can be a real pain to set up a bunch of fixtures with repeating or incrementing data.  There&amp;#8217;s a &lt;strong&gt;much&lt;/strong&gt; better tool out there for that &amp;#8211; Excel.&lt;/p&gt;


	&lt;p&gt;One way you can ease the pain of generating reams of fixture data is to build it all up in Excel and export your spreadsheets as csv files and tell Rails to use csv fixtures.  Unfortunately I couldn&amp;#8217;t find a way to have a moniker (my name for the non-indented line in your yaml fixtures) in the csv files so that I could refer to fixtures by name in my tests.&lt;/p&gt;


	&lt;p&gt;So what I&amp;#8217;ve done is to write a little plugin and rake task that converts xls files into yaml fixtures.  See:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://svn.protocool.com/public/plugins/trunk/xls_fixtures/"&gt;http://svn.protocool.com/public/plugins/trunk/xls_fixtures/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Note that it requires the &amp;#8216;parseexcel&amp;#8217; gem (as in &amp;#8220;gem install parseexcel&amp;#8221;) and you need to arrange your rows and columns as per the &lt;a href="http://svn.protocool.com/public/plugins/trunk/xls_fixtures/README"&gt;README&lt;/a&gt; file in the plugin.&lt;/p&gt;

</description>
      <pubDate>Tue, 17 Oct 2006 13:54:46 EDT</pubDate>
      <guid>&lt;a href="/articles/2006/10/17/new-plugin-xls_fixtures"&gt;New Plugin: xls_fixtures&lt;/a&gt;</guid>
      <link>&lt;a href="/articles/2006/10/17/new-plugin-xls_fixtures"&gt;New Plugin: xls_fixtures&lt;/a&gt;</link>
    </item>
  </channel>
</rss>
