Sha256: 5e904a7ce8a6c60212197ee0a1f7498fdde336d147c24c13e67043e71562a549

Contents?: true

Size: 771 Bytes

Versions: 11

Compression:

Stored size: 771 Bytes

Contents

require 'spec_helper'

describe Xommelier::RSS::EmailAddress do
  {
    'al@semyonov.us' => ['al@semyonov.us', nil],
    'al@semyonov.us (Alexander)' => ['al@semyonov.us', 'Alexander'],
    'al@semyonov.us (Alexander Semyonov)' => ['al@semyonov.us', 'Alexander Semyonov']
  }.each do |email_address, (address, name)|
    it "parses #{email_address.inspect} as address:#{address.inspect}, name:#{name.inspect}" do
      e = described_class.from_xommelier(email_address)
      e.should == address
      e.name.should == name
    end

    it "produces #{email_address.inspect} from address:#{address.inspect}, name:#{name.inspect}" do
      e = described_class.new
      e.address = address
      e.name = name
      e.to_xommelier.should == email_address
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
xommelier-0.1.30 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.29 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.28 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.27 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.26 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.25 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.24 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.23 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.22 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.21 spec/lib/xommelier/rss/email_address_spec.rb
xommelier-0.1.20 spec/lib/xommelier/rss/email_address_spec.rb