Sha256: a12060afbc589f723b0db7d044081c5d617d9304da5f5916ff5091236ea39714
Contents?: true
Size: 643 Bytes
Versions: 12
Compression:
Stored size: 643 Bytes
Contents
require 'test_helper' require 'active_support/core_ext/hash/reverse_merge' ActiveValidators.activate(:date) # 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
12 entries across 12 versions & 1 rubygems