Skip to content

Commit

Permalink
Add spec for SpecTag#unescape
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Sep 28, 2015
1 parent e13dde3 commit 3e76cd0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/runner/tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,15 @@
[one].==([two]).should == true
end
end

describe SpecTag, "#unescape" do
it "replaces \\n by LF when the description is quoted" do
tag = SpecTag.new 'tag:"desc with\nnew line"'
tag.description.should == "desc with\nnew line"
end

it "does not replaces \\n by LF when the description is not quoted " do
tag = SpecTag.new 'tag:desc with\nnew line'
tag.description.should == "desc with\\nnew line"
end
end

0 comments on commit 3e76cd0

Please sign in to comment.