Skip to content

Instantly share code, notes, and snippets.

@cpetschnig
Created November 17, 2009 21:06
Show Gist options
  • Save cpetschnig/237262 to your computer and use it in GitHub Desktop.
Save cpetschnig/237262 to your computer and use it in GitHub Desktop.
# in file helper_test.rb:
def haml_tag_helper_method
haml_buffer.options[:escape_html] = true
haml_tag :div do
haml_tag :span, 'foo'
end
end
def test_haml_tag_with_block
assert_equal("<div>\n <span>foo</span>\n</div>\n", render("- haml_tag_helper_method", :scope_object => self))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment