Sha256: 6568fa8e7c9f8101eb68d5eca882570e8511cb48c62d20cb115486e3f6c2462a

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 Bytes

Contents

require 'spec_helper'

describe UniversalValidators::DateValidator do
  describe '.valid?' do
    context 'with valid date' do
      it "return true" do
        date = UniversalValidators::DateValidator.new('2015-02-25')
        expect(date).to be_valid
      end
    end

    context 'with invalid date' do
      it "return false" do
        date = UniversalValidators::DateValidator.new('2015-02-29')
        expect(date).to_not be_valid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
universal_validators-1.0.0 spec/date_validator_spec.rb