Sha256: 25bd370e76589b428a1268f891c39b8db4f59b5420a524ed1883b57f73545cec
Contents?: true
Size: 535 Bytes
Versions: 3
Compression:
Stored size: 535 Bytes
Contents
require 'spec_helper' describe Vanguard::DSL, '#validates_inclusion_of' do include Spec::Shared::DSL before do builder.validates_inclusion_of attribute_name, :within => Set[*set] end let(:set) { [:a, :b, :c] } describe 'when validated attribute value is included in the set' do let(:attribute_value) { set.first } it_should_be_a_valid_instance end describe 'when validated attribute value is not included in the set' do let(:attribute_value) { :foo } it_should_be_an_invalid_instance end end
Version data entries
3 entries across 3 versions & 1 rubygems