spec/plain_spec.rb in colander-0.2.1 vs spec/plain_spec.rb in colander-0.2.2
- old
+ new
@@ -3,16 +3,22 @@
describe "#parse" do
it "retreives emails from an csv file" do
parser = Colander::Parser::Plain.new("spec/fixtures/plain.csv")
parser.parse
- parser.emails.sort.should eql(["jonas.forsberg@mynewsdesk.com", "peter.forsberg@xhockeypro.com"].sort)
+ expect(parser.emails.sort).to eq ["jonas.forsberg@mynewsdesk.com", "alfred.pennyworth@gotham.travel", "peter.forsberg@xhockeypro.com"].sort
end
+ it 'supports top-level-domains of all sizes' do
+ parser = Colander::Parser::Plain.new("spec/fixtures/plain.csv")
+ parser.parse
+ expect(parser.emails.sort).to eq ["jonas.forsberg@mynewsdesk.com", "alfred.pennyworth@gotham.travel", "peter.forsberg@xhockeypro.com"].sort
+ end
+
it "retreives emails from an txt file" do
parser = Colander::Parser::Plain.new("spec/fixtures/text.txt")
parser.parse
- parser.emails.sort.should eql(["jonas.forsberg@mynewsdesk.com", "kristian.hellquist@mynewsdesk.com", "richard@mynewsdesk.com"].sort)
+ expect(parser.emails.sort).to eq ["jonas.forsberg@mynewsdesk.com", "kristian.hellquist@mynewsdesk.com", "richard@mynewsdesk.com"].sort
end
end
end