Sha256: 7997351111b53a67dce773ac5586456adaf990ef551d8a86e0e1feaf2a23685b
Contents?: true
Size: 800 Bytes
Versions: 16
Compression:
Stored size: 800 Bytes
Contents
describe "'Squiggly' heredoc" do context "when heredoc is blank" do it "returns a blank string" do heredoc = <<~HERE HERE heredoc.should == "" end end context "when heredoc contains multiple lines" do it "selects a least-indented line and removes its indentation from all the lines" do heredoc = <<~HERE a b c HERE heredoc.should == "a\n b\n c\n" end end it "supports escaped heredoc identifier" do <<~"HERE".should == "" HERE <<~'HERE'.should == "" HERE end it "doesn't allow <<-~ syntax" do lambda { eval("<<-~HERE\nHERE") }.should raise_error end it "doesn't allow <<~- syntax" do lambda { eval("<<~-HERE\nHERE") }.should raise_error end end
Version data entries
16 entries across 16 versions & 1 rubygems