spec/useless/doc/ui/godel_spec.rb in useless-doc-0.6.2 vs spec/useless/doc/ui/godel_spec.rb in useless-doc-0.6.3
- old
+ new
@@ -210,6 +210,18 @@
li_content.should include 'Authentication Required'
li_content.should include 'Authentication Not Required'
end
end
end
+
+ describe '.strip_heredoc' do
+ it 'should strip non-significant whitespace from a heredoc' do
+ string = <<-HEREDOC
+ This is a heredoc
+ This is indented
+ HEREDOC
+
+ Useless::Doc::UI::Godel.strip_heredoc(string).should ==
+ "This is a heredoc\n This is indented\n"
+ end
+ end
end