Sha256: ef9d2a3d1a27b2a6f67f4727fba4e1efa4a091cf3c352ffe06a58654cd560501

Contents?: true

Size: 548 Bytes

Versions: 1

Compression:

Stored size: 548 Bytes

Contents

require 'spec_helper'

describe Mail::DateTimeElement do

  it "should parse a date" do
    date_text  = 'Wed, 27 Apr 2005 14:15:31 -0700'
    doing { Mail::DateTimeElement.new(date_text) }.should_not raise_error
  end

  it "should raise an error if the input is useless" do
    date_text = nil
    doing { Mail::DateTimeElement.new(date_text) }.should raise_error
  end

  it "should raise an error if the input is useless" do
    date_text  = '""""""""""""""""'
    doing { Mail::DateTimeElement.new(date_text) }.should raise_error
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-mail_exception-0.0.1 vendor/mail/spec/mail/elements/date_time_element_spec.rb