Sha256: dd3b46338b149e4400bd7449f91278aa519ee6bc96b7d5831e0ea1dedbaca922
Contents?: true
Size: 418 Bytes
Versions: 19
Compression:
Stored size: 418 Bytes
Contents
RSpec.describe 'Building schemas' do describe 'Dry::Validation.Schema' do it 'builds a schema class with custom predicate set' do predicates = Module.new do include Dry::Logic::Predicates def zomg?(*) true end end schema = Dry::Validation.Schema(predicates: predicates, build: false) expect(schema.predicates[:key?]).to be_a(Method) end end end
Version data entries
19 entries across 19 versions & 1 rubygems