Sha256: 5ed8d0941dadcb90ea973e77b27486d498587e77219fd5d5e1987789f775d1c4

Contents?: true

Size: 759 Bytes

Versions: 27

Compression:

Stored size: 759 Bytes

Contents

# encoding: UTF-8

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

require 'spec_helper'

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

  describe "#initialize" do
    it "chooses gregorian as the calendar type if none is specified" do
      expect(described_class.new(:es).calendar_type).to eq(:gregorian)
      expect(described_class.new(:es, calendar_type: :julian).calendar_type).to eq(: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
      expect(data_reader).to receive(:path_for).with(:medium, anything).and_call_original
      data_reader.pattern
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
twitter_cldr-6.0.1 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.0.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-5.4.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-5.3.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-5.2.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-5.1.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-5.0.0 spec/data_readers/date_time_data_reader_spec.rb