Sha256: c3fce02acb29a24018b1664c146569554718aa81d1c7ae0b8a94413d03e6d394

Contents?: true

Size: 737 Bytes

Versions: 2

Compression:

Stored size: 737 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

require 'spec_helper'

include TwitterCldr::DataReaders

describe DateTimeDataReader do
  let(:data_reader) { DateTimeDataReader.new(:es) }

  describe "#initialize" do
    it "chooses gregorian as the calendar type if none is specified" do
      DateTimeDataReader.new(:es).calendar_type.should == :gregorian
      DateTimeDataReader.new(:es, :calendar_type => :julian).calendar_type.should == :julian
    end
  end

  describe "#pattern" do
    it "as of CLDR 23, should choose the medium date time path if no other type is specified" do
      mock.proxy(data_reader).path_for(:medium, anything)
      data_reader.pattern
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitter_cldr-3.0.1 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.0 spec/data_readers/date_time_data_reader_spec.rb