[rspec-users] (no subject)

Tom Locke tom at hobocentral.net
Thu Jun 21 11:59:36 EDT 2007

Thanks David,

I'm not sure this covers my situation though - I'll give a bit more  

The class I'm specing is the DRYML compiler -- yep I'm doing  
retroactive specing I'm afraid, which is maybe why things don't fit  
too neatly.

You instantiate the class, passing the DRYML source, and then call  
process_src which converts the DRYML to regular ERB, and returns that  
as a string.

At the moment I'm doing stuff like this:

describe Template do

   it "should compile tag calls to method calls" do
     compile_dryml("<foo/>").should == "<%= foo() %>"

   it "should compile attributes as keyword parameters" do
     compile_dryml("<foo a='1'/>").should == '<%= foo({:a => "1"}) %>'


Those compile_dryml calls each instantiate a template with a  
different state. I really don't want to have a separate describe  
block for each example - there could be hundreds. Is this bad form?


More information about the rspec-users mailing list