Sha256: 81a7e0b2122803b2e7d839481a13082edf1196ce9fd91765ee7b82600a5b1bae
Contents?: true
Size: 380 Bytes
Versions: 2
Compression:
Stored size: 380 Bytes
Contents
require 'spec_helper' describe Id::Validations do class ValidationModel include Id::Model include Id::Form field :cats validates_presence_of :cats end it 'delegates validations to the active model class' do model = ValidationModel.new expect(model).not_to be_valid expect(model.errors.messages).to eq ({ cats: ["can't be blank"] }) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
id-0.1.1 | spec/lib/id/validations_spec.rb |
id-0.1 | spec/lib/id/validations_spec.rb |