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.12.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.11.5 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.11.4 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.11.3 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.11.2 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.11.1 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.11.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.10.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.9.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.8.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.7.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.6.2 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.6.1 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.6.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.5.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.4.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.3.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.2.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.1.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-6.0.2 spec/data_readers/date_time_data_reader_spec.rb