Sha256: b1f4f2335d6859fbfeada36703c23906fa17d3d7385c5bc645bdb7efa66bcc39
Contents?: true
Size: 1.74 KB
Versions: 17
Compression:
Stored size: 1.74 KB
Contents
RSpec.describe 'Predicates: Key' do context 'with required' do it "raises error" do expect { Dry::Validation.Form { required(:foo) { key? } } }.to raise_error InvalidSchemaError end end context 'with optional' do it "raises error" do expect { Dry::Validation.Form { optional(:foo) { key? } } }.to raise_error InvalidSchemaError end end context 'as macro' do context 'with required' do context 'with value' do it "raises error" do expect { Dry::Validation.Form do required(:foo).value(:key?) end }.to raise_error InvalidSchemaError end end context 'with filled' do it "raises error" do expect { Dry::Validation.Form do required(:foo).filled(:key?) end }.to raise_error InvalidSchemaError end end context 'with maybe' do it "raises error" do expect { Dry::Validation.Form do required(:foo).maybe(:key?) end }.to raise_error InvalidSchemaError end end end context 'with optional' do context 'with value' do it "raises error" do expect { Dry::Validation.Schema do optional(:foo).value(:key?) end }.to raise_error InvalidSchemaError end end context 'with filled' do it "raises error" do expect { Dry::Validation.Schema do optional(:foo).filled(:key?) end }.to raise_error InvalidSchemaError end end context 'with maybe' do it "raises error" do expect { Dry::Validation.Schema do optional(:foo).maybe(:key?) end }.to raise_error InvalidSchemaError end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems