[rspec-users] How-to spec this helper method?...

Bart Zonneveld loop at superinfinite.com
Thu Dec 20 05:31:43 EST 2007


Hey gang,

I have this dead-simple method defined in a helper:

   def add_category_link(name)
     link_to_function name do |page|
       page.insert_html :bottom, :categories, :partial =>  
'category', :object => Category.new
     end
   end

Where, and mostly how, would I spec this? I haven't been able to find  
how to stub the rjs in a helper spec, so I'd appreciate any pointers  
whatsoever..

thanks!
bartz


More information about the rspec-users mailing list