Sha256: 81a47dd8d719051ec801dcc9683dd1b546dd18e027e58fa0846fe9e8bf33ef05

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

require './lib/i18n-date.rb'

describe Date do
  
  RESULT_DATE = "22 June 2010"

  it "should respond to parse_international" do
    Date.should be_respond_to(:parse_international)
  end

  it "should return a date correctly" do
    Date.month_to_english("22 jun 2010").should be_eql(RESULT_DATE)
    Date.month_to_english("22 de jun 2010").should be_eql(RESULT_DATE)
    Date.month_to_english("22 de jun de 2010").should be_eql(RESULT_DATE)
    Date.month_to_english("22 junio 2010").should be_eql(RESULT_DATE)
    Date.month_to_english("22 de junio 2010").should be_eql(RESULT_DATE)
    Date.month_to_english("22 de junio de 2010").should be_eql(RESULT_DATE)
    Date.month_to_english("jun 22, 2010").should be_eql("June 22, 2010")
    Date.month_to_english("Martes, 22 de junio de 2010").should be_eql(RESULT_DATE)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n-date-0.0.1 spec/date_spec.rb