Sha256: 1cef61a88a41d3008e1aa72da041e52bf9e2c4a630d2839c95989514e4662a36

Contents?: true

Size: 747 Bytes

Versions: 17

Compression:

Stored size: 747 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
      expect(DateTimeDataReader.new(:es).calendar_type).to eq(:gregorian)
      expect(DateTimeDataReader.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
      mock.proxy(data_reader).path_for(:medium, anything)
      data_reader.pattern
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/twitter_cldr-3.2.1/spec/data_readers/date_time_data_reader_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/twitter_cldr-3.2.1/spec/data_readers/date_time_data_reader_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/twitter_cldr-3.1.2/spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.2.1 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.2.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.1.2 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.1.1 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.1.0 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.10 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.9 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.8 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.7 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.6 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.5 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.4 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.3 spec/data_readers/date_time_data_reader_spec.rb
twitter_cldr-3.0.2 spec/data_readers/date_time_data_reader_spec.rb