test/activity_spec.rb in friends-0.3 vs test/activity_spec.rb in friends-0.4

- old
+ new

@@ -138,9 +138,19 @@ # No match found. activity.description.must_equal "Field trip to the JimJohn Co." end end + describe "when name is escaped with a backslash" do + # We have to use two backslashes here because that's how Ruby encodes one. + let(:description) { "Dinner with \\Elizabeth Cady Stanton." } + it "does not match a friend and removes the backslash" do + subject + # No match found. + activity.description.must_equal "Dinner with Elizabeth Cady Stanton." + end + end + describe "when name has leading asterisks" do let(:description) { "Dinner with **Elizabeth Cady Stanton." } it "does not match a friend" do subject # No match found.