Created
December 30, 2010 21:49
-
-
Save apotonick/760353 to your computer and use it in GitHub Desktop.
AV::ViewHelper replacement.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from tag_helper_test.rb | |
# now: | |
# TAG TODO: Move this into a real template | |
def test_content_tag_nested_in_content_tag_in_erb | |
buffer = content_tag("p") { concat content_tag("b", "Hello") } | |
assert_equal '<p><b>Hello</b></p>', buffer | |
end | |
# better: | |
# TAG TODO: Move this into a real template | |
def test_content_tag_nested_in_content_tag_in_erb | |
buffer = in_view do content_tag("p") { concat content_tag("b", "Hello") } end | |
assert_equal '<p><b>Hello</b></p>', buffer | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment