Sha256: 9acb00c4f5e210d8244e3f3a8e7da50ba00d6b1993d5b4f404a1d8f094c902f1
Contents?: true
Size: 733 Bytes
Versions: 1
Compression:
Stored size: 733 Bytes
Contents
require 'spec_helper' describe 'PolishValidatorRails' do before(:all) do class Dummy include ActiveModel::Validations attr_accessor :nip, :pesel, :regon validates :nip, nip: true validates :pesel, pesel: true validates :regon, regon: true end end describe 'any class that include ActiveModel::Validations' do it "has :nip validator" do expect(Dummy.validators.map(&:class).include?(NipValidator)).to be_truthy end it "has :pesel validator" do expect(Dummy.validators.map(&:class).include?(PeselValidator)).to be_truthy end it "has :regon validator" do expect(Dummy.validators.map(&:class).include?(RegonValidator)).to be_truthy end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
polish_validators_rails-1.0.0 | spec/polish_validators_rails_spec.rb |