testing helpers with 'haml_tag'
        Posted  
        
            by crankharder
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by crankharder
        
        
        
        Published on 2009-06-01T14:18:19Z
        Indexed on 
            2010/06/18
            3:03 UTC
        
        
        Read the original article
        Hit count: 287
        
module FooHelper
  def foo
    haml_tag(:div) do
      haml_content("bar")
    end
  end
end
When I test this I get:
NoMethodError: undefined method `haml_tag'
This code is perfectly valid and works in a development/production environment.
It's something to do with having the haml helpers properly loaded in the test environment.
Thanks!
© Stack Overflow or respective owner