spec/murdoc/annotator_spec.rb in murdoc-0.1.5 vs spec/murdoc/annotator_spec.rb in murdoc-0.1.6
- old
+ new
@@ -58,9 +58,15 @@
it "should remove trailing comment blank line" do
subject.source = "# Hello\n# \n \n\n"
subject.should have_exactly(1).paragraphs
subject.paragraphs[0].annotation.should == "Hello"
end
+
+ it "should not remove more than one space" do
+ subject.source = "# Hello"
+ subject.should have_exactly(1).paragraphs
+ subject.paragraphs[0].annotation.should == " Hello"
+ end
end
context "for source with multi-line comments" do
let(:source) { "=begin\n Block one\n Block one!!!!\n=end\n def hi\nputs 'hello'\nend\n=begin\nBlock two\n=end\ndef yo\nputs 'rap'\nend\n" }
\ No newline at end of file