Sha256: 9e4923ee5b0590d0b5c6130f1ce1b7e09ebf7b101b8dc3a1fe5c023afc93c1dc
Contents?: true
Size: 962 Bytes
Versions: 2
Compression:
Stored size: 962 Bytes
Contents
require 'spec_helper' describe Colander::Parser::Plain do describe "#parse" do it "retreives emails from an csv file" 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 '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 expect(parser.emails.sort).to eq ["jonas.forsberg@mynewsdesk.com", "kristian.hellquist@mynewsdesk.com", "richard@mynewsdesk.com"].sort end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
colander-0.2.3 | spec/plain_spec.rb |
colander-0.2.2 | spec/plain_spec.rb |