haml/haml — pull request #723 by mmircea16 (2013-11-07 19:49:50+00:00)
Title: Fix for the 694 issue: Modified the logic determining the output of capturing haml content

The 694 issue highlights an edge case when capturing haml: the buffer doesn't modify and the ugly flag is turned on. This pull request contains:
- Moved logic to determine the output of capturing haml to the capture_haml method of helpers
- Modify logic to address the edge case described above
- Test that replicates the issue
- Simple test of rendering with ugly flag turned on (for coverage purposes)
- Extracted logic about prettifying the text (adding correct tabs when ugly flag is off) to a private method