spec/unit/tailor/lexer_spec.rb in tailor-1.1.1 vs spec/unit/tailor/lexer_spec.rb in tailor-1.1.2
- old
+ new
@@ -120,6 +120,24 @@
it "adds a newline at the end" do
subject.ensure_trailing_newline(text).should == text + "\n"
end
end
end
+
+ describe "#sub_line_ending_backslashes" do
+ let!(:text) do
+ %Q{command \\
+ 'something'}
+ end
+
+ before do
+ def subject.sub_publicly(file_text)
+ sub_line_ending_backslashes(file_text)
+ end
+ end
+
+ it "replaces all line-ending backslashes with a comment" do
+ subject.sub_publicly(text).should == %Q{command # TAILOR REMOVED BACKSLASH
+ 'something'}
+ end
+ end
end