search for: foohelper

Displaying 4 results from an estimated 4 matches for "foohelper".

2007 Apr 13
4
mock out render call in helper
Hello, Does someone know where I can hook in to mock out a render call from a helper in Rails? I know I can do this in view specs with the following @controller.template.stub!(:render) but template doesn''t seem to be attached to @controller in a helper context. Thanks. -Chris
2007 Dec 20
3
How-to spec this helper method?...
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
2007 Mar 15
0
Rails Helpers
Hi, Just trying to spec out my helpers and so far its been working well enough. I now have a helper as follows FooHelper def a b end def b end end But for some reason, probably something really simple, I cant work out how to spec that a calls b. Ive looked at all the variables that get set up and tried playing with them, but no luck. Maybe someone can shed some light on this for me. Apologies in adv...
2006 Feb 14
22
Teaching Models to Render Themselves in the Controller
I am trying to teach my models how to render themselves, i.e. <%= my_model_object.render() %> Let me explain my reasoning and proposed method before this gets shot down as anti-MVC. Let''s say I am writing a contact-management application. I have a class Contact. I will need to display this class all over the application. My first choice is to use a partial. Now I can