Sha256: 71d515c8fe7113172c3e46e2c5088b881e8afde3a2105e4e62e09ddea724af86

Contents?: true

Size: 1.42 KB

Versions: 23

Compression:

Stored size: 1.42 KB

Contents

RSpec.describe ValidatesTimeliness do

  it 'should alias use_euro_formats to remove_us_formats on Timeliness gem' do
    expect(Timeliness).to respond_to(:remove_us_formats) 
  end

  it 'should alias to date_for_time_type to dummy_date_for_time_type on Timeliness gem' do
    expect(Timeliness).to respond_to(:dummy_date_for_time_type) 
  end

  describe "config" do
    it 'should delegate default_timezone to Timeliness gem' do
      expect(Timeliness).to receive(:default_timezone=)
      ValidatesTimeliness.default_timezone = :utc
    end

    it 'should delegate dummy_date_for_time_type to Timeliness gem' do
      expect(Timeliness).to receive(:dummy_date_for_time_type) 
      expect(Timeliness).to receive(:dummy_date_for_time_type=) 
      array = ValidatesTimeliness.dummy_date_for_time_type
      ValidatesTimeliness.dummy_date_for_time_type = array
    end

    context "parser" do
      it 'should delegate add_formats to Timeliness gem' do
        expect(Timeliness).to receive(:add_formats)
        ValidatesTimeliness.parser.add_formats
      end

      it 'should delegate remove_formats to Timeliness gem' do
        expect(Timeliness).to receive(:remove_formats)
        ValidatesTimeliness.parser.remove_formats
      end

      it 'should delegate remove_us_formats to Timeliness gem' do
        expect(Timeliness).to receive(:remove_us_formats)
        ValidatesTimeliness.parser.remove_us_formats
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
validates_timeliness-8.0.0.beta1 spec/validates_timeliness_spec.rb
validates_timeliness-7.0.0 spec/validates_timeliness_spec.rb
validates_timeliness-7.0.0.beta2 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.1 spec/validates_timeliness_spec.rb
validates_timeliness-6.0.1 spec/validates_timeliness_spec.rb
validates_timeliness-7.0.0.beta1 spec/validates_timeliness_spec.rb
validates_timeliness-6.0.0 spec/validates_timeliness_spec.rb
validates_timeliness-6.0.0.beta2 spec/validates_timeliness_spec.rb
validates_timeliness-6.0.0.beta1 spec/validates_timeliness_spec.rb
validates_timeliness-6.0.0.alpha1 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0.beta2 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0.beta1 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0.alpha5 spec/validates_timeliness_spec.rb
validates_timeliness-4.1.1 spec/validates_timeliness_spec.rb
validates_timeliness-4.1.0 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0.alpha4 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0.alpha3 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0.alpha2 spec/validates_timeliness_spec.rb
validates_timeliness-5.0.0.alpha1 spec/validates_timeliness_spec.rb