Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Steve Ellis
committed
Feb 15, 2011
1 parent
8e30510
commit b2022ed
Showing
3 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'dependencies.rb' | ||
|
||
describe Markers do | ||
describe "MARKERS" do | ||
context "matching emails" do | ||
it "correctly parses GMAIL" do | ||
message = "Here \nOn Fri, Jan 7, 2011 at 3:09 PM, ahiruubdfsu <notifications@rr.redroverhq.us> wrote:\nstuff" | ||
parsed = message.split(/#{Markers::GMAIL}/s) | ||
|
||
parsed.size.should == 2 | ||
parsed.should include "Here \n" | ||
parsed.should include "\nstuff" | ||
end | ||
it "correctly parses IPHONE" do | ||
message = "start\nOn Jan 24, 2011, at 8:00 PM, Airbnb <automated@airbnb.com> wrote:\nAIRBNB FTW" | ||
parsed = message.split(/#{Markers::IPHONE}/s) | ||
|
||
parsed.size.should == 2 | ||
parsed.should include "start\n" | ||
parsed.should include "\nAIRBNB FTW" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters