Guest User

Untitled

a guest
Jul 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. # from tag_helper_test.rb
  2.  
  3. # now:
  4. # TAG TODO: Move this into a real template
  5. def test_content_tag_nested_in_content_tag_in_erb
  6. buffer = content_tag("p") { concat content_tag("b", "Hello") }
  7. assert_equal '<p><b>Hello</b></p>', buffer
  8. end
  9.  
  10. # better:
  11.  
  12. # TAG TODO: Move this into a real template
  13. def test_content_tag_nested_in_content_tag_in_erb
  14. buffer = in_view do content_tag("p") { concat content_tag("b", "Hello") } end
  15. assert_equal '<p><b>Hello</b></p>', buffer
  16. end
Add Comment
Please, Sign In to add comment