Sha256: 4b8a028b16f42ad8e7dd70d5e105287c17f03d256a955cc3f46a9652df5bd338

Contents?: true

Size: 557 Bytes

Versions: 6

Compression:

Stored size: 557 Bytes

Contents

require 'test_helper'

# ActiveValidators relies on another gem called "date_validator" edited
# by the fine folks at Codegram.
#
# If you wanna see tests for this gem, go take a look at the repository
# [on Github](https://github.com/codegram/date_validator)
describe "Date Validation" do
  it "finds the translations" do
    TestRecord.validates :start_date, :date => {:before => :end_date }
    d = TestRecord.new(:start_date => Time.now, :end_date => Time.now - 1)

    refute d.valid?
    refute_includes d.errors.to_s, 'translation missing'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activevalidators-2.0.2 test/validations/date_test.rb
activevalidators-2.0.1 test/validations/date_test.rb
activevalidators-2.0.0 test/validations/date_test.rb
activevalidators-1.9.0 test/validations/date_test.rb
activevalidators-1.8.1 test/validations/date_test.rb
activevalidators-1.8.0 test/validations/date_test.rb