I think this is a bug more in your testing environment than in Haml. Rails
2.2.2 uses the output_buffer to determine where to concatenate text; this
isn't something unique to Haml.

On Mon, Dec 29, 2008 at 3:25 AM, caifara <[email protected]>wrote:

>
> I just upgraded an app to rails 2.2.2, rspec 1.1.11 and haml 2.0.6 and
> I'm seeing this problem in some helper-methods:
>
> undefined local variable or method `output_buffer' for
> #<Spec::Rails::Example::HelperExampleGroup::Subclass_1:0x35cccb0>
>
> short backtrace:
>
> /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> test_process.rb:471:in `method_missing'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/
> text_helper.rb:42:in `concat'
> /Library/Ruby/Gems/1.8/gems/haml-2.1.0/lib/haml/helpers/
> action_view_mods.rb:146:in `form_tag'
> /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/
> prototype_helper.rb:338:in `form_remote_tag'
>
> (the haml 2.1.0 is one I builded from github after 2.0.6 throwed that
> same error)
>
> All errors come from helper methods constructing a form using haml
> helpers, example:
>
> capture_haml do
>    form_remote_tag :url => some_path do
>         ....
>    end
> end
>
> The error only exists in my specs, the actual app does not fail.
> spec_helper.rb contains:
>
> config.with_options(:behaviour_type => :helpers) do |config|
>    config.include Haml::Helpers
>    config.include ActionView::Helpers
>    config.prepend_before :all do
>       init_haml_helpers
>    end
> end
>
> (It all used to work before the upgrade...)
>
> Thanks in advance for any advice.
>
> -c
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to