Sha256: 78983674a2b73aede3f5c5b78b46f02272785c2f720cf86449809ff19239e402
Contents?: true
Size: 417 Bytes
Versions: 12
Compression:
Stored size: 417 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DHS::Item do before do class Record < DHS::Record end end subject { Record.new } context 'add error' do it 'allows to add validation errors to the instance itself' do subject.errors.add(:name, 'This date is invalid') expect( subject.errors.first ).to eq ['name', 'This date is invalid'] end end end
Version data entries
12 entries across 12 versions & 1 rubygems